X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/c85541913b99f841de090aacf626bb8f52f7f727..6fbe73b6a048046a4e674df12d5db9223acac67c:/src/system.h diff --git a/src/system.h b/src/system.h index a56c058a..eba7845e 100644 --- a/src/system.h +++ b/src/system.h @@ -173,6 +173,8 @@ typedef size_t uintptr_t; #define obstack_chunk_free free #include +/* String-grow: append Str to Obs. */ + #define obstack_sgrow(Obs, Str) \ obstack_grow (Obs, Str, strlen (Str)) @@ -217,6 +219,11 @@ typedef size_t uintptr_t; } while (0) +/* Append the ending 0, finish Obs, and return the string. */ + +# define obstack_finish0(Obs) \ + (obstack_1grow (Obs, '\0'), (char *) obstack_finish (Obs)) +