Define null symbol
MODIFY
include/mruby/symbol.h
include/mruby/symbol.h
MRB_BEGIN_DECL
typedef enum mrb_reserved_symbol {
+ mrb_sym_null = 0, // NULL symbol
mrb_sym_add = 1, // +
mrb_sym_sub = 2, // -
mrb_sym_mul = 3, // *

MODIFY
src/symbol.c
src/symbol.c
@@ -187,7 +187,7 @@ static struct reserved_symbol_t reserved_symbols[] = {
{ mrb_sym_gt, ">" },
{ mrb_sym_ge, ">=" },
{ mrb_sym_method_missing, "method_missing" },
- { 0, NULL },
+ { mrb_sym_null, NULL },
};
void
@@ -196,7 +196,7 @@ mrb_init_symtbl(mrb_state *mrb)
int i;
mrb->name2sym = kh_init(n2s, mrb);
- for (i = 0; reserved_symbols[i].sym != 0; ++i) {
+ for (i = 0; reserved_symbols[i].sym != mrb_sym_null; ++i) {
mrb_sym s = mrb_intern_static(mrb, reserved_symbols[i].str, strlen(reserved_symbols[i].str));
mrb_assert(s == reserved_symbols[i].sym);
}

Define null symbol