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 a8b0f58..3a82e7f 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))
 
 
 /*-----------------------------------------.