From 442e485824c87bbef95836be1f3a0f6d86386445 Mon Sep 17 00:00:00 2001 From: Teddy Date: Wed, 16 Apr 2014 12:43:35 +0800 Subject: storage calc & sizeof --- semantics.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'semantics.h') diff --git a/semantics.h b/semantics.h index b3cadaa..df6eeaf 100644 --- a/semantics.h +++ b/semantics.h @@ -37,7 +37,10 @@ struct CType { } type; const char *name; union { - CTable_t fields; /* for a struct or union */ + struct { + CTable_t fields; /* for a struct or union */ + CVar_t flist; + } st; CType_t ref; /* for a pointer */ struct { CType_t elem; @@ -73,17 +76,11 @@ struct CTNode { typedef struct CTable { CTNode *head[MAX_TABLE_SIZE]; Hashfunc_t hfunc; -#ifdef CIBIC_DEBUG Printfunc_t pfunc; -#endif } CTable; -#ifdef CIBIC_DEBUG CTable_t ctable_create(Hashfunc_t hfunc, Printfunc_t pfunc); -#else -CTable_t ctable_create(Hashfunc_t hfunc); -#endif void ctable_destroy(CTable_t ct); void *ctable_lookup(CTable_t ct, const char *key); int ctable_insert(CTable_t ct, const char *key, void *val, int lvl); -- cgit v1.2.3