Re: Add missing const qualifier in ECPG
| От | Qingqing Zhou |
|---|---|
| Тема | Re: Add missing const qualifier in ECPG |
| Дата | |
| Msg-id | Pine.LNX.4.58.0511121816350.9886@eon.cs обсуждение исходный текст |
| Ответ на | Re: Add missing const qualifier in ECPG (Peter Eisentraut <peter_e@gmx.net>) |
| Список | pgsql-patches |
On Sat, 12 Nov 2005, Peter Eisentraut wrote:
> Qingqing Zhou wrote:
> > ***************
> > *** 149,155 ****
> > if (!(*stmt = (struct statement *) ECPGalloc(sizeof(struct
> > statement), lineno))) return false;
> >
> > ! (*stmt)->command = query;
> > (*stmt)->connection = connection;
> > (*stmt)->lineno = lineno;
> > (*stmt)->compat = compat;
> > --- 150,156 ----
> > if (!(*stmt = (struct statement *) ECPGalloc(sizeof(struct
> > statement), lineno))) return false;
> >
> > ! (*stmt)->command = (char *)query;
> > (*stmt)->connection = connection;
> > (*stmt)->lineno = lineno;
> > (*stmt)->compat = compat;
>
> This sort of "cheating" should be avoided.
>
Yeah ... this is a "cheating" trade ... :-)
*** 1417,1423 ****
ECPGdo_descriptor(int line, const char *connection,
const char *descriptor, const char *query)
{
! return ECPGdo(line, ECPG_COMPAT_PGSQL, true, connection, (char *) query, ECPGt_EOIT,
ECPGt_descriptor, descriptor, 0L, 0L, 0L,
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
}
--- 1418,1424 ----
ECPGdo_descriptor(int line, const char *connection,
const char *descriptor, const char *query)
{
! return ECPGdo(line, ECPG_COMPAT_PGSQL, true, connection, query, ECPGt_EOIT,
ECPGt_descriptor, descriptor, 0L, 0L, 0L,
ECPGt_NO_INDICATOR, NULL, 0L, 0L, 0L, ECPGt_EORT);
}
Regards,
Qingqing
В списке pgsql-patches по дате отправления: