Go to the source code of this file.
◆ TABLE_SZ
Value:
Definition at line 3 of file symbol.c.
◆ free_symbol()
Definition at line 13 of file symbol.c.
13 {
17}
#define mp_free2(p, sz, a)
static ANN void free_symbol(MemPool p, const Symbol s)
◆ free_symbols()
Definition at line 19 of file symbol.c.
19 {
21 for (
uint i = ht->
sz + 1; --i;) {
24 }
27}
static ANN void gwt_lock_end(gwtlock_t *lock)
◆ insert_symbol()
Definition at line 39 of file symbol.c.
39 {
44 for (
Symbol sym = syms; sym; sym = sym->next)
45 if (!strcmp(sym->name, name)) return sym;
49 return ht->
sym[index];
50}
ANN unsigned int hash(const m_str s0)
static Symbol mksymbol(MemPool p, const m_str name, const Symbol next)
static ANN int gwt_unlock(gwtlock_t *lock)
static ANN int gwt_lock(gwtlock_t *lock)
◆ mksymbol()
Definition at line 32 of file symbol.c.
32 {
35 strcpy(s->
name, name);
36 return s;
37}
#define mp_malloc2(p, sz)
◆ new_symbol_table()
Definition at line 5 of file symbol.c.
5 {
10 return st;
11}
struct SymTable_ SymTable
static ANN int gwt_lock_ini(gwtlock_t *lock)