15#ifndef MRBC_SRC_C_HASH_H_
16#define MRBC_SRC_C_HASH_H_
92#if defined(MRBC_ALLOC_VMID)
96static inline void mrbc_hash_clear_vm_id(
mrbc_value *hash) {
97 mrbc_array_clear_vm_id(hash);
struct RObject mrbc_value
Value object. Default version.
int mrbc_array_resize(mrbc_value *ary, int size)
mrbc_value mrbc_hash_get(const mrbc_value *hash, const mrbc_value *key)
mrbc_value * mrbc_hash_search(const mrbc_value *hash, const mrbc_value *key)
mrbc_value mrbc_hash_remove(mrbc_value *hash, const mrbc_value *key)
void mrbc_hash_clear(mrbc_value *hash)
int mrbc_hash_compare(const mrbc_value *v1, const mrbc_value *v2)
mrbc_value mrbc_hash_dup(mrbc_vm *vm, mrbc_value *src)
mrbc_value * mrbc_hash_get_p(const mrbc_value *hash, const mrbc_value *key)
mrbc_value mrbc_hash_remove_by_id(mrbc_value *hash, mrbc_sym sym_id)
mrbc_value mrbc_hash_new(mrbc_vm *vm, int size)
void mrbc_hash_delete(mrbc_value *hash)
mrbc_value * mrbc_hash_search_by_id(const mrbc_value *hash, mrbc_sym sym_id)
int mrbc_hash_set(mrbc_value *hash, mrbc_value *key, mrbc_value *val)
struct RHash mrbc_hash
Hash object.
static mrbc_value * mrbc_hash_i_next(mrbc_hash_iterator *ite)
static int mrbc_hash_size(const mrbc_value *hash)
static int mrbc_hash_i_has_next(mrbc_hash_iterator *ite)
struct RHashIterator mrbc_hash_iterator
Define Hash iterator.
static int mrbc_hash_resize(mrbc_value *hash, int size)
static mrbc_hash_iterator mrbc_hash_iterator_new(const mrbc_value *v)
uint16_t data_size
data buffer size.
uint16_t n_stored
num of stored.
mrbc_value * data
pointer to allocated memory.
mruby/c value definitions
int16_t mrbc_sym
mruby/c symbol ID
struct VM mrbc_vm
Virtual Machine.