38 0, 0, 0, 0, 0, 0, 0, 0, 0,
109 int diff = strlen(str1) - strlen(str2);
110 int len = diff < 0 ? strlen(str1) : strlen(str2);
111 int res = memcmp(str1, str2, len);
112 return (res != 0) ? res : diff;
148 return -1 + (d1 == d2) + (d1 > d2)*2;
153#if defined(MRBC_ALLOC_VMID)
206 while( (ch = *s++) !=
'\0' ) {
215 if(
'0' <= ch && ch <=
'9' ) {
220 if( n >= base )
break;
222 ret = ret * base + n;
225 if( sign ) ret = -ret;
242 if( n <= 0 )
return 0;
245 if( (*dest++ = *src++) == 0 )
goto RETURN;
250 return destsize - n - 1;
266 if( val == NULL )
return 0;
315 if( val == NULL )
return 0;
364 if( val == NULL )
return 0;
412 if( val == NULL )
return 0;
453 if( val == NULL )
return 0;
494 if( val == NULL )
return 0;
534 "wrong number of arguments (given %d, expected %d)", argc, n);
558 "wrong number of arguments (given %d, expected %d)", argc, n);
593 if( argc < n )
return default_value;
615 "wrong number of arguments (given %d, expected %d)", argc, n);
650 if( argc < n )
return default_value;
672 "wrong number of arguments (given %d, expected %d)", argc, n);
704 if( argc < n )
return default_value;
726 "wrong number of arguments (given %d, expected %d)", argc, n);
761 if( argc < n )
return default_value;
int mrbc_array_compare(const mrbc_value *v1, const mrbc_value *v2)
void mrbc_array_delete(mrbc_value *ary)
int mrbc_hash_compare(const mrbc_value *v1, const mrbc_value *v2)
void mrbc_hash_delete(mrbc_value *hash)
void mrbc_proc_delete(mrbc_value *val)
void mrbc_range_delete(mrbc_value *v)
int mrbc_range_compare(const mrbc_value *v1, const mrbc_value *v2)
void mrbc_string_delete(mrbc_value *str)
static char * mrbc_string_cstr(const mrbc_value *v)
static int mrbc_string_compare(const mrbc_value *v1, const mrbc_value *v2)
void mrbc_instance_delete(mrbc_value *v)
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)
void mrbc_exception_delete(mrbc_value *value)
void mrbc_raisef(struct VM *vm, struct RClass *exc_cls, const char *fstr,...)
#define mrbc_israised(vm)
Include at once the necessary header files.
const char * mrbc_symid_to_str(mrbc_sym sym_id)
int mrbc_arg_b2(struct VM *vm, mrbc_value v[], int argc, int n, int default_value)
char * mrbc_to_s(struct VM *vm, mrbc_value v[], int argc, mrbc_value *val)
const char * mrbc_val_s2(struct VM *vm, const mrbc_value *val, const char *default_value)
void(*const mrbc_delfunc[])(mrbc_value *)
mrbc_int_t mrbc_to_i(struct VM *vm, mrbc_value v[], int argc, mrbc_value *val)
mrbc_int_t mrbc_val_i(struct VM *vm, const mrbc_value *val)
const char * mrbc_val_s(struct VM *vm, const mrbc_value *val)
mrbc_value * mrbc_arg(struct VM *vm, mrbc_value v[], int argc, int n)
double mrbc_val_f2(struct VM *vm, const mrbc_value *val, double default_value)
const char * mrbc_arg_s(struct VM *vm, mrbc_value v[], int argc, int n)
int mrbc_compare(const mrbc_value *v1, const mrbc_value *v2)
mrbc_float_t mrbc_arg_f(struct VM *vm, mrbc_value v[], int argc, int n)
mrbc_int_t mrbc_arg_i2(struct VM *vm, mrbc_value v[], int argc, int n, mrbc_int_t default_value)
int mrbc_arg_b(struct VM *vm, mrbc_value v[], int argc, int n)
mrbc_int_t mrbc_val_i2(struct VM *vm, const mrbc_value *val, mrbc_int_t default_value)
mrbc_float_t mrbc_to_f(struct VM *vm, mrbc_value v[], int argc, mrbc_value *val)
int mrbc_strcpy(char *dest, int destsize, const char *src)
mrbc_int_t mrbc_atoi(const char *s, int base)
mrbc_float_t mrbc_arg_f2(struct VM *vm, mrbc_value v[], int argc, int n, mrbc_float_t default_value)
const char * mrbc_arg_s2(struct VM *vm, mrbc_value v[], int argc, int n, const char *default_value)
mrbc_int_t mrbc_arg_i(struct VM *vm, mrbc_value v[], int argc, int n)
double mrbc_val_f(struct VM *vm, const mrbc_value *val)
static void mrbc_decref(mrbc_value *v)
#define mrbc_set_integer(p, n)
#define mrbc_set_float(p, n)
@ MRBC_TT_FALSE
FalseClass.
@ MRBC_TT_INTEGER
Integer.
@ MRBC_TT_OBJECT
General instance.
struct RObject mrbc_value
Global configuration of mruby/c VM's.