1 /*
2 ** init.c - initialize mruby core
3 **
4 ** See Copyright Notice in mruby.h
5 */
6 
7 #include <mruby.h>
8 
9 void mrb_init_symtbl(mrb_state*);
10 void mrb_init_class(mrb_state*);
11 void mrb_init_object(mrb_state*);
12 void mrb_init_kernel(mrb_state*);
13 void mrb_init_comparable(mrb_state*);
14 void mrb_init_enumerable(mrb_state*);
15 void mrb_init_symbol(mrb_state*);
16 void mrb_init_string(mrb_state*);
17 void mrb_init_exception(mrb_state*);
18 void mrb_init_proc(mrb_state*);
19 void mrb_init_array(mrb_state*);
20 void mrb_init_hash(mrb_state*);
21 void mrb_init_numeric(mrb_state*);
22 void mrb_init_range(mrb_state*);
23 void mrb_init_gc(mrb_state*);
24 void mrb_init_math(mrb_state*);
25 void mrb_init_version(mrb_state*);
26 void mrb_init_mrblib(mrb_state*);
27 
28 #define DONE mrb_gc_arena_restore(mrb, 0);
29 void
mrb_init_core(mrb_state * mrb)30 mrb_init_core(mrb_state *mrb)
31 {
32   mrb_init_symtbl(mrb); DONE;
33 
34   mrb_init_class(mrb); DONE;
35   mrb_init_object(mrb); DONE;
36   mrb_init_kernel(mrb); DONE;
37   mrb_init_comparable(mrb); DONE;
38   mrb_init_enumerable(mrb); DONE;
39 
40   mrb_init_symbol(mrb); DONE;
41   mrb_init_string(mrb); DONE;
42   mrb_init_exception(mrb); DONE;
43   mrb_init_proc(mrb); DONE;
44   mrb_init_array(mrb); DONE;
45   mrb_init_hash(mrb); DONE;
46   mrb_init_numeric(mrb); DONE;
47   mrb_init_range(mrb); DONE;
48   mrb_init_gc(mrb); DONE;
49   mrb_init_version(mrb); DONE;
50   mrb_init_mrblib(mrb); DONE;
51 }
52