aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tccpp.c b/tccpp.c
index b80c986..4b7b4fa 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -163,6 +163,12 @@ PUB_FUNC void cstr_free(CString *cstr)
cstr_new(cstr);
}
+/* reset string to empty */
+PUB_FUNC void cstr_reset(CString *cstr)
+{
+ cstr->size = 0;
+}
+
/* XXX: unicode ? */
static void add_char(CString *cstr, int c)
{