Commit 36664174 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

change return type of mrb_p() to void

parent 6ea5c6b5
......@@ -354,7 +354,7 @@ int mrb_checkstack(mrb_state*,int);
mrb_value mrb_top_self(mrb_state *);
mrb_value mrb_run(mrb_state*, struct RProc*, mrb_value);
mrb_value mrb_p(mrb_state*, mrb_value);
void mrb_p(mrb_state*, mrb_value);
mrb_int mrb_obj_id(mrb_value obj);
mrb_sym mrb_to_id(mrb_state *mrb, mrb_value name);
......
......@@ -27,13 +27,12 @@ printstr(mrb_state *mrb, mrb_value obj)
}
}
mrb_value
void
mrb_p(mrb_state *mrb, mrb_value obj)
{
obj = mrb_funcall(mrb, obj, "inspect", 0);
printstr(mrb, obj);
putc('\n', stdout);
return obj;
}
/* 15.3.1.2.9 */
......@@ -72,10 +71,9 @@ mrb_show_copyright(mrb_state *mrb)
printf("mruby - Copyright (c) 2010-2012 mruby developers\n");
}
#else
mrb_value
void
mrb_p(mrb_state *mrb, mrb_value obj)
{
return obj;
}
void
......
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