mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 15:53:03 +00:00
use obstack_printf
This is not just nicer, it is also much safer, since we were using sprintf... * bootstrap.conf: Require it. * src/system.h (obstack_fgrow1, obstack_fgrow2, obstack_fgrow3) (obstack_fgrow4): Remove. Adjust dependencies.
This commit is contained in:
@@ -43,14 +43,14 @@ extern struct obstack muscle_obstack;
|
||||
|
||||
#define MUSCLE_INSERT_INT(Key, Value) \
|
||||
do { \
|
||||
obstack_fgrow1 (&muscle_obstack, "%d", Value); \
|
||||
obstack_printf (&muscle_obstack, "%d", Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
} while (0)
|
||||
|
||||
#define MUSCLE_INSERT_LONG_INT(Key, Value) \
|
||||
do { \
|
||||
obstack_fgrow1 (&muscle_obstack, "%ld", Value); \
|
||||
obstack_printf (&muscle_obstack, "%ld", Value); \
|
||||
obstack_1grow (&muscle_obstack, 0); \
|
||||
muscle_insert (Key, obstack_finish (&muscle_obstack)); \
|
||||
} while (0)
|
||||
|
||||
Reference in New Issue
Block a user