mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
cdump.c: should dump zero symbol (skip) too.
Zero symbol in the symbol table now means anonymous arguments.
This commit is contained in:
+4
-1
@@ -194,7 +194,10 @@ sym_var_name(mrb_state *mrb, const char *initname, const char *key, int n)
|
||||
static int
|
||||
cdump_sym(mrb_state *mrb, mrb_sym sym, const char *var_name, int idx, mrb_value init_syms_code, FILE *fp)
|
||||
{
|
||||
if (sym == 0) return MRB_DUMP_INVALID_ARGUMENT;
|
||||
if (sym == 0) {
|
||||
fputs("0,", fp);
|
||||
return MRB_DUMP_OK;
|
||||
}
|
||||
|
||||
mrb_int len;
|
||||
const char *name = mrb_sym_name_len(mrb, sym, &len), *op_name;
|
||||
|
||||
Reference in New Issue
Block a user