Re: Add missing const qualifier in ECPG

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-patches(at)postgresql(dot)org
Cc: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Subject: Re: Add missing const qualifier in ECPG
Date: 2005-11-12 23:14:01
Message-ID: 200511130014.02521.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Qingqing Zhou 2005-11-12 23:21:55 Re: Add missing const qualifier in ECPG
Previous Message Qingqing Zhou 2005-11-12 22:20:29 Add missing const qualifier in ECPG