44 {
48
51 };
52
54
56
57 if (result != nullptr) {
58
60 }
61
63
64
66
69 return sym;
70}
void * hmap_lookup(srn_context_t *ctx, const hmap_t *hmap, const hmap_key_t *k, void *default_value)
Lookup the given k in the given hmap and return the value if it's been found.
hmap_t hmap_insert(srn_context_t *ctx, const hmap_t *hmap, hmap_key_t *k, void *v)
Insert the given key k with the value v in the given hash hmap and return the new map.
hmap_key_t * hmap_make_key(srn_context_t *ctx, void *data, size_t len)
Create a new key out of the given data, with the given len.
bool srn_string_is_empty(const srn_string_t *s)
Note: For key equality we use the memcpy function.
hmap_t sym_table
A mapping symbol names to (srn_value_t with type symbol).
srn_spinlock_t sym_table_lock
size_t size
Size of the buffer.
uint8_t buffer[]
The buffer that holds the WTF8 sequence.
srn_value_t * srn_symbol_make(srn_context_t *ctx, srn_metadata_t *metadata, srn_namespace_t *ns, srn_string_t *name)
Create a new symbol. IT DOES NOT INTERNALIZE THE SYMBOL.
static void srn_spinlock_lock(srn_spinlock_t *lock)
static void srn_spinlock_unlock(srn_spinlock_t *lock)