1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-03 22:24:49 +03:00

Cosmetic PL/PgSQL fix: declare the second parameter plpgsql_dstring_append

as a const char *, so that we don't need to cast away a const in gram.y
This commit is contained in:
Neil Conway 2004-09-14 23:46:46 +00:00
parent 1459d8c4b0
commit d1b0d965b1
3 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.61 2004/08/20 22:00:14 tgl Exp $ * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.62 2004/09/14 23:46:46 neilc Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
@ -1709,7 +1709,7 @@ read_sql_construct(int until,
lno = plpgsql_scanner_lineno(); lno = plpgsql_scanner_lineno();
plpgsql_dstring_init(&ds); plpgsql_dstring_init(&ds);
plpgsql_dstring_append(&ds, (char *) sqlstart); plpgsql_dstring_append(&ds, sqlstart);
for (;;) for (;;)
{ {

View File

@ -3,7 +3,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.36 2004/08/30 02:54:42 momjian Exp $ * $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.37 2004/09/14 23:46:46 neilc Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
@ -80,7 +80,7 @@ plpgsql_dstring_free(PLpgSQL_dstring *ds)
* ---------- * ----------
*/ */
void void
plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str) plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str)
{ {
int len = strlen(str); int len = strlen(str);
int needed = ds->used + len + 1; int needed = ds->used + len + 1;

View File

@ -3,7 +3,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.54 2004/09/13 20:09:21 tgl Exp $ * $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.55 2004/09/14 23:46:46 neilc Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
@ -716,7 +716,7 @@ extern void plpgsql_xact_cb(XactEvent event, TransactionId parentXid, void *arg)
*/ */
extern void plpgsql_dstring_init(PLpgSQL_dstring *ds); extern void plpgsql_dstring_init(PLpgSQL_dstring *ds);
extern void plpgsql_dstring_free(PLpgSQL_dstring *ds); extern void plpgsql_dstring_free(PLpgSQL_dstring *ds);
extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str); extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str);
extern char *plpgsql_dstring_get(PLpgSQL_dstring *ds); extern char *plpgsql_dstring_get(PLpgSQL_dstring *ds);
/* ---------- /* ----------