Use `NULL` instead of `0`; close #2467

The PR was from @cubicdaiya.
parent 3ff2757b
......@@ -94,7 +94,7 @@ mrb_true(mrb_state *mrb, mrb_value obj)
static mrb_value
nil_to_s(mrb_state *mrb, mrb_value obj)
{
mrb_value str = mrb_str_new_frozen(mrb, 0, 0);
mrb_value str = mrb_str_new_frozen(mrb, NULL, 0);
RSTR_SET_ASCII_FLAG(mrb_str_ptr(str));
return str;
}
......
......@@ -571,7 +571,7 @@ sym_inspect(mrb_state *mrb, mrb_value sym)
char *sp;
name = mrb_sym_name_len(mrb, id, &len);
str = mrb_str_new(mrb, 0, len+1);
str = mrb_str_new(mrb, NULL, len+1);
sp = RSTRING_PTR(str);
sp[0] = ':';
memcpy(sp+1, name, len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment