Index: ChangeLog
from  Akim  <akim@epita.fr>
	* src/symtab.h (struct symbol): Declare the printer and destructor
	as const, to avoid accidental calls to free.
	(symbol_destructor_set, symbol_printer_set): Adjust.
	* src/symtab.c: Adjust.

+2005-09-16  Akim  <akim@epita.fr>
+
 	* data/c.m4 (b4_token_enums): New.
 	(b4_token_defines): Rename as...
 	(b4_token_enums_defines): this.
Index: src/symtab.c
===================================================================
RCS file: /cvsroot/bison/bison/src/symtab.c,v
retrieving revision 1.65
diff -u -r1.65 symtab.c
--- src/symtab.c 20 Jul 2005 21:17:04 -0000 1.65
+++ src/symtab.c 16 Sep 2005 19:49:28 -0000
@@ -130,7 +130,7 @@
 `------------------------------------------------------------------*/
 
 void
-symbol_destructor_set (symbol *sym, char *destructor, location loc)
+symbol_destructor_set (symbol *sym, const char *destructor, location loc)
 {
   if (destructor)
     {
@@ -147,7 +147,7 @@
 `---------------------------------------------------------------*/
 
 void
-symbol_printer_set (symbol *sym, char *printer, location loc)
+symbol_printer_set (symbol *sym, const char *printer, location loc)
 {
   if (printer)
     {
Index: src/symtab.h
===================================================================
RCS file: /cvsroot/bison/bison/src/symtab.h,v
retrieving revision 1.57
diff -u -r1.57 symtab.h
--- src/symtab.h 12 Jul 2005 15:58:49 -0000 1.57
+++ src/symtab.h 16 Sep 2005 19:49:28 -0000
@@ -60,10 +60,12 @@
   uniqstr type_name;
   location type_location;
 
-  char *destructor;
+  /* Does not own the memory. */
+  const char *destructor;
   location destructor_location;
 
-  char *printer;
+  /* Does not own the memory. */
+  const char *printer;
   location printer_location;
 
   symbol_number number;
@@ -109,10 +111,10 @@
 void symbol_type_set (symbol *sym, uniqstr type_name, location loc);
 
 /* Set the DESTRUCTOR associated with SYM.  */
-void symbol_destructor_set (symbol *sym, char *destructor, location loc);
+void symbol_destructor_set (symbol *sym, const char *destructor, location loc);
 
 /* Set the PRINTER associated with SYM.  */
-void symbol_printer_set (symbol *sym, char *printer, location loc);
+void symbol_printer_set (symbol *sym, const char *printer, location loc);
 
 /* Set the PRECEDENCE associated with SYM.  Ensure that SYMBOL is a
    terminal.  Do nothing if invoked with UNDEF_ASSOC as ASSOC.  */
