aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorjiang <30155751@qq.com>2014-05-02 11:23:54 +0800
committerjiang <30155751@qq.com>2014-05-02 11:23:54 +0800
commit6c8207633fd42e420e32bdf4912be9fbf307f5ad (patch)
treef2bf62fb1288ac5fe026d2d6a54447e733154bb1 /libtcc.c
parent5b52a44b524916bf564a9c399ce536a7ea5b5201 (diff)
downloadtinycc-6c8207633fd42e420e32bdf4912be9fbf307f5ad.tar.gz
tinycc-6c8207633fd42e420e32bdf4912be9fbf307f5ad.tar.bz2
Fixes include the double quotes bug
Added push_macro, pop_macro support Fix pack bug, when output with-E will pack the bug
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libtcc.c b/libtcc.c
index b9f5952..28b6407 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -868,6 +868,7 @@ LIBTCCAPI void tcc_undefine_symbol(TCCState *s1, const char *sym)
static void tcc_cleanup(void)
{
int i, n;
+ CSym *def;
if (NULL == tcc_state)
return;
tcc_state = NULL;
@@ -877,8 +878,11 @@ static void tcc_cleanup(void)
/* free tokens */
n = tok_ident - TOK_IDENT;
- for(i = 0; i < n; i++)
+ for(i = 0; i < n; i++){
+ def = &table_ident[i]->sym_define;
+ tcc_free(def->data);
tcc_free(table_ident[i]);
+ }
tcc_free(table_ident);
/* free sym_pools */