This patch makes the second parameter to plpgsql_dstring_append() a
const char * (rather than a char *), to get rid of a cast in gram.y.
This patch has been applied to HEAD.

-Neil

Index: src/pl/plpgsql/src/gram.y
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/pl/plpgsql/src/gram.y,v
retrieving revision 1.61
diff -c -r1.61 gram.y
*** src/pl/plpgsql/src/gram.y	20 Aug 2004 22:00:14 -0000	1.61
--- src/pl/plpgsql/src/gram.y	14 Sep 2004 11:08:06 -0000
***************
*** 1709,1715 ****
  
  	lno = plpgsql_scanner_lineno();
  	plpgsql_dstring_init(&ds);
! 	plpgsql_dstring_append(&ds, (char *) sqlstart);
  
  	for (;;)
  	{
--- 1709,1715 ----
  
  	lno = plpgsql_scanner_lineno();
  	plpgsql_dstring_init(&ds);
! 	plpgsql_dstring_append(&ds, sqlstart);
  
  	for (;;)
  	{
Index: src/pl/plpgsql/src/pl_funcs.c
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/pl/plpgsql/src/pl_funcs.c,v
retrieving revision 1.36
diff -c -r1.36 pl_funcs.c
*** src/pl/plpgsql/src/pl_funcs.c	30 Aug 2004 02:54:42 -0000	1.36
--- src/pl/plpgsql/src/pl_funcs.c	14 Sep 2004 11:07:12 -0000
***************
*** 80,86 ****
   * ----------
   */
  void
! plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str)
  {
  	int			len = strlen(str);
  	int			needed = ds->used + len + 1;
--- 80,86 ----
   * ----------
   */
  void
! plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str)
  {
  	int			len = strlen(str);
  	int			needed = ds->used + len + 1;
Index: src/pl/plpgsql/src/plpgsql.h
===================================================================
RCS file: /Users/neilc/local/cvs/pgsql-server/src/pl/plpgsql/src/plpgsql.h,v
retrieving revision 1.54
diff -c -r1.54 plpgsql.h
*** src/pl/plpgsql/src/plpgsql.h	13 Sep 2004 20:09:21 -0000	1.54
--- src/pl/plpgsql/src/plpgsql.h	14 Sep 2004 11:08:24 -0000
***************
*** 716,722 ****
   */
  extern void plpgsql_dstring_init(PLpgSQL_dstring *ds);
  extern void plpgsql_dstring_free(PLpgSQL_dstring *ds);
! extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, char *str);
  extern char *plpgsql_dstring_get(PLpgSQL_dstring *ds);
  
  /* ----------
--- 716,722 ----
   */
  extern void plpgsql_dstring_init(PLpgSQL_dstring *ds);
  extern void plpgsql_dstring_free(PLpgSQL_dstring *ds);
! extern void plpgsql_dstring_append(PLpgSQL_dstring *ds, const char *str);
  extern char *plpgsql_dstring_get(PLpgSQL_dstring *ds);
  
  /* ----------
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to