mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
obstacks: simplifications
* src/system.h (obstack_finish0): New. Use it to simplify several uses. * src/muscle-tab.h (MUSCLE_INSERTF): New. * src/muscle-tab.c: Use obstack_printf where simpler.
This commit is contained in:
@@ -86,10 +86,7 @@ static struct obstack obstack_for_string;
|
||||
obstack_grow (&obstack_for_string, yytext, yyleng)
|
||||
|
||||
# define STRING_FINISH \
|
||||
do { \
|
||||
obstack_1grow (&obstack_for_string, '\0'); \
|
||||
last_string = obstack_finish (&obstack_for_string); \
|
||||
} while (0)
|
||||
(last_string = obstack_finish0 (&obstack_for_string))
|
||||
|
||||
# define STRING_FREE \
|
||||
obstack_free (&obstack_for_string, last_string)
|
||||
|
||||
Reference in New Issue
Block a user