Commit d1b0d965 authored by Neil Conway's avatar Neil Conway

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
parent 1459d8c4
...@@ -4,7 +4,7 @@ ...@@ -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, ...@@ -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 (;;)
{ {
......
...@@ -3,7 +3,7 @@ ...@@ -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) ...@@ -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;
......
...@@ -3,7 +3,7 @@ ...@@ -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) ...@@ -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);
/* ---------- /* ----------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment