mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 14:23:04 +00:00
* 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.
This commit is contained in:
@@ -130,7 +130,7 @@ symbol_type_set (symbol *sym, uniqstr type_name, location loc)
|
||||
`------------------------------------------------------------------*/
|
||||
|
||||
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 @@ symbol_destructor_set (symbol *sym, char *destructor, location loc)
|
||||
`---------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
symbol_printer_set (symbol *sym, char *printer, location loc)
|
||||
symbol_printer_set (symbol *sym, const char *printer, location loc)
|
||||
{
|
||||
if (printer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user