void mrb_init_core(mrb_state *mrb) { mrb_init_symtbl(mrb); mrb_init_class(mrb); mrb_init_object(mrb); mrb_init_kernel(mrb); mrb_init_comparable(mrb); mrb_init_enumerable(mrb); mrb_init_symbols(mrb); mrb_init_proc(mrb); mrb_init_string(mrb); mrb_init_array(mrb); mrb_init_hash(mrb); mrb_init_numeric(mrb); mrb_init_range(mrb); mrb_init_struct(mrb); mrb_init_gc(mrb); #ifdef INCLUDE_REGEXP mrb_init_regexp(mrb); #endif mrb_init_exception(mrb); mrb_init_print(mrb); mrb_init_time(mrb); mrb_init_math(mrb); mrb_init_mrblib(mrb); mrb_gc_arena_restore(mrb, 0); }
void mrb_init_core(mrb_state *mrb) { mrb_init_symtbl(mrb); mrb_init_class(mrb); mrb_init_object(mrb); mrb_init_kernel(mrb); mrb_init_comparable(mrb); mrb_init_enumerable(mrb); mrb_init_symbols(mrb); mrb_init_proc(mrb); mrb_init_string(mrb); Init_version(mrb); /* after init_string */ mrb_init_array(mrb); mrb_init_hash(mrb); mrb_init_numeric(mrb); mrb_init_range(mrb); mrb_init_struct(mrb); mrb_init_gc(mrb); #ifdef INCLUDE_REGEXP mrb_init_regexp(mrb); mrb_init_encoding(mrb); #endif mrb_init_exception(mrb); mrb_init_print(mrb); mrb_init_time(mrb); #ifdef MANDEL mrb_define_method(mrb, mrb->kernel_module, "pow", mpow, ARGS_REQ(2)); mrb_define_method(mrb, mrb->kernel_module, "sqrt", msqrt, ARGS_REQ(1)); mrb_define_method(mrb, mrb->kernel_module, "putc", mputc, ARGS_REQ(1)); #endif mrb_init_mrblib(mrb); mrb_gc_arena_restore(mrb, 0); }