#include "ctrump/common/symbol.h"
#include "ctrump/common/mempool.h"
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.
Data Structures | |
| struct | table |
| シンボルテーブル More... | |
Functions | |
| static unsigned int | hash (const char *symstr, int symlen) |
| void | ctrump_init_symtab (int initial_size) |
| void | ctrump_destroy_symtab (void) |
| struct ctrump_symbol * | ctrump_intern (const char *symstr, int symstrlen) |
| get symbol | |
| int | ctrump_get_current_symbol_num (void) |
| get current number of symbols. | |
Variables | |
| static int | symbol_id = 0 |
Definition in file symbol.c.
| void ctrump_destroy_symtab | ( | void | ) |
| int ctrump_get_current_symbol_num | ( | void | ) |
get current number of symbols.
Definition at line 125 of file symbol.c.
References symbol_id.
Referenced by env_Init().
| void ctrump_init_symtab | ( | int | initial_size | ) |
Definition at line 68 of file symbol.c.
References ctrump_mempool_init(), and symbol_id.
Referenced by ctrump_init_all().
| struct ctrump_symbol* ctrump_intern | ( | const char * | symstr, | |
| int | symstrlen | |||
| ) | [read] |
get symbol
| symstr | charactors (not require zero terminate charactor) | |
| symstrlen | length of `symstr' |
Definition at line 88 of file symbol.c.
References ctrump_symbol::chain, ctrump_mempool_alloc, ctrump_mempool_alloc_align(), hash(), ctrump_symbol::hashval, ctrump_symbol::id, symbol_id, ctrump_symbol::symlen, and ctrump_symbol::symstr.
Referenced by build_symbol().
| static unsigned int hash | ( | const char * | symstr, | |
| int | symlen | |||
| ) | [static] |
int symbol_id = 0 [static] |
Definition at line 65 of file symbol.c.
Referenced by ctrump_get_current_symbol_num(), ctrump_init_symtab(), and ctrump_intern().
1.5.6