From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Payman <payman(at)Club-Internet(dot)fr>, Michael Klatt <mdklatt(at)ou(dot)edu>, pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: PQcmdTuples() declaration |
Date: | 2002-11-08 15:15:12 |
Message-ID: | 5860.1036768512@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> The issue with PQcmdTuples() and PQcmdStatus() are that they return
> *result structure member pointers. The patch makes the *result a const,
> then we have to return the values as const's. The code compiled OK, so
> I assume that is fine. How does that sound to others, or should we keep
> the result non-const?
Adding a const to the result type will break client applications that
aren't expecting it. I don't think we can get away with that.
We could still declare the input type as const if we were willing to
cast away const inside the functions, but that seems pretty ugly.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-11-08 15:55:11 | Re: PQcmdTuples() declaration |
Previous Message | Payman | 2002-11-08 09:25:04 | Re: PQcmdTuples() declaration |