Skip to content

Commit d1b0d96

Browse files
author
Neil Conway
committed
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
1 parent 1459d8c commit d1b0d96

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/pl/plpgsql/src/gram.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* procedural language
55
*
66
* IDENTIFICATION
7-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.61 2004/08/20 22:00:14 tgl Exp $
7+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.62 2004/09/14 23:46:46 neilc Exp $
88
*
99
* This software is copyrighted by Jan Wieck - Hamburg.
1010
*
@@ -1709,7 +1709,7 @@ read_sql_construct(int until,
17091709

17101710
lno = plpgsql_scanner_lineno();
17111711
plpgsql_dstring_init(&ds);
1712-
plpgsql_dstring_append(&ds, (char *) sqlstart);
1712+
plpgsql_dstring_append(&ds, sqlstart);
17131713

17141714
for (;;)
17151715
{

src/pl/plpgsql/src/pl_funcs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.36 2004/08/30 02:54:42 momjian Exp $
6+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_funcs.c,v 1.37 2004/09/14 23:46:46 neilc Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -80,7 +80,7 @@ plpgsql_dstring_free(PLpgSQL_dstring *ds)
8080
* ----------
8181
*/
8282
void
83-
plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str)
83+
plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str)
8484
{
8585
int len = strlen(str);
8686
int needed = ds->used + len + 1;

src/pl/plpgsql/src/plpgsql.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.54 2004/09/13 20:09:21 tgl Exp $
6+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.55 2004/09/14 23:46:46 neilc Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -716,7 +716,7 @@ extern void plpgsql_xact_cb(XactEvent event, TransactionId parentXid, void *arg)
716716
*/
717717
extern void plpgsql_dstring_init(PLpgSQL_dstring *ds);
718718
extern void plpgsql_dstring_free(PLpgSQL_dstring *ds);
719-
extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str);
719+
extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str);
720720
extern char *plpgsql_dstring_get(PLpgSQL_dstring *ds);
721721

722722
/* ----------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy