diff options
author | Teddy <[email protected]> | 2014-04-16 12:43:35 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2014-04-16 12:43:35 +0800 |
commit | 442e485824c87bbef95836be1f3a0f6d86386445 (patch) | |
tree | 29bdb9a4f67303bf93209e95df6fee7dbcad431a /semantics.h | |
parent | 3c520b2038e749e545a98f6b77c52f74eedb0e40 (diff) |
storage calc & sizeof
Diffstat (limited to 'semantics.h')
-rw-r--r-- | semantics.h | 11 |
1 files changed, 4 insertions, 7 deletions
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); |