]> git.saurik.com Git - bison.git/commitdiff
obstack: import obstack_finish0 from master
authorTheophile Ranquet <theophile.ranquet@gmail.com>
Wed, 10 Oct 2012 17:14:01 +0000 (17:14 +0000)
committerAkim Demaille <akim@lrde.epita.fr>
Thu, 11 Oct 2012 07:30:18 +0000 (09:30 +0200)
* src/system.h (obstack_finish0): New.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
src/system.h

index a8b0f5847b755b458d26f4880747bb23a6de7a72..3a82e7f3fcde9ae94760531345c15cdf2c29bbbf 100644 (file)
@@ -202,7 +202,10 @@ 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))
 
 
 /*-----------------------------------------.