86 .data_size = size * 2,
228 memmove(v, v+2, (
char*)(h->
data + h->
n_stored) - (
char*)v);
255 memmove(v, v+2, (
char*)(h->
data + h->
n_stored) - (
char*)v);
291 if( d2 == NULL )
return 1;
407 for(
int i = 0; i < klen; i++ ) {
416 for(
int i = 0; i < klen; i++ ) {
447 for(
int i = 0; i < klen; i++ ) {
645 if( argc < 1 || argc > 2 ) {
696 s1 =
mrbc_send( vm, v, argc, &kv[0],
"inspect", 0 );
702 s1 =
mrbc_send( vm, v, argc, &kv[1],
"inspect", 0 );
747#include "_autogen_class_hash.h"
#define mrbc_immediate_value(...)
static void mrbc_set_tt(mrbc_value *p, mrbc_vtype type)
struct RObject mrbc_value
Value object. Default version.
int mrbc_array_push(mrbc_value *ary, mrbc_value *set_val)
mrbc_value mrbc_array_get(const mrbc_value *ary, int idx)
mrbc_value mrbc_array_new(mrbc_vm *vm, int size)
void mrbc_array_clear(mrbc_value *ary)
void mrbc_array_delete(mrbc_value *ary)
static int mrbc_array_size(const mrbc_value *ary)
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 mrbc_hash_iterator mrbc_hash_iterator_new(const mrbc_value *v)
void mrbc_object_inspect(mrbc_vm *vm, mrbc_value v[], int argc)
void mrbc_string_delete(mrbc_value *str)
int mrbc_string_append(mrbc_value *s1, const mrbc_value *s2)
static int mrbc_string_append_cstr(mrbc_value *s1, const char *s2)
static mrbc_value mrbc_string_new_cstr(mrbc_vm *vm, const char *src)
mrbc_value mrbc_send(struct VM *vm, mrbc_value *v, int argc, mrbc_value *recv, const char *method_name, int n_params,...)
void mrbc_raise(struct VM *vm, struct RClass *exc_cls, const char *msg)
Include at once the necessary header files.
uint16_t n_stored
num of stored.
mrbc_value * data
pointer to allocated memory.
const char * mrbc_symid_to_str(mrbc_sym sym_id)
int mrbc_compare(const mrbc_value *v1, const mrbc_value *v2)
static void mrbc_decref(mrbc_value *v)
#define MRBC_INIT_OBJECT_HEADER_DI(t)
#define SET_BOOL_RETURN(n)
#define SET_INT_RETURN(n)
static void mrbc_incref(mrbc_value *v)
int16_t mrbc_sym
mruby/c symbol ID
#define SET_FALSE_RETURN()
struct VM mrbc_vm
Virtual Machine.
Global configuration of mruby/c VM's.