diff options
| -rw-r--r-- | tcc.h | 2 | ||||
| -rw-r--r-- | tccpp.c | 6 |
2 files changed, 7 insertions, 1 deletions
@@ -1008,7 +1008,7 @@ PUB_FUNC void cstr_cat(CString *cstr, const char *str); PUB_FUNC void cstr_wccat(CString *cstr, int ch); PUB_FUNC void cstr_new(CString *cstr); PUB_FUNC void cstr_free(CString *cstr); -#define cstr_reset(cstr) cstr_free(cstr) +PUB_FUNC void cstr_reset(CString *cstr); ST_FUNC Section *new_section(TCCState *s1, const char *name, int sh_type, int sh_flags); ST_FUNC void section_realloc(Section *sec, unsigned long new_size); @@ -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) { |
