mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 23:03:04 +00:00
* src/symtab.c (symbol_free): Remove dead deactivated code:
type_name are properly removed.
Don't use XFREE to free items that cannot be NULL.
* src/struniq.h, src/struniq.c: New.
* src/main.c (main): Initialize/free struniqs.
* src/parse-gram.y (%union): Add astruniq member.
(yyprint): Adjust.
* src/scan-gram.l (<{tag}>): Return a struniq.
Free the obstack bit that used to store it.
* src/symtab.h (symbol_t): The 'type_name' member is a struniq.
This commit is contained in:
@@ -200,13 +200,8 @@ symbol_user_token_number_set (symbol_t *symbol,
|
||||
static void
|
||||
symbol_free (symbol_t *this)
|
||||
{
|
||||
#if 0
|
||||
/* This causes crashes because one string can appear more
|
||||
than once. */
|
||||
XFREE (this->type_name);
|
||||
#endif
|
||||
XFREE (this->tag);
|
||||
XFREE (this);
|
||||
free (this->tag);
|
||||
free (this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user