print.c: fix a compilation errors with `MRB_NO_STDIO`; fix
MODIFY
src/print.c
src/print.c
@@ -47,6 +47,26 @@ mrb_p(mrb_state *mrb, mrb_value obj)
printstr(mrb_inspect(mrb, obj), stdout);
}
}
+
+
+MRB_API void
+mrb_print_error(mrb_state *mrb)
+{
+ mrb_print_backtrace(mrb);
+}
+
+MRB_API void
+mrb_show_version(mrb_state *mrb)
+{
+ printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), MRB_SYM(MRUBY_DESCRIPTION)), stdout);
+}
+
+MRB_API void
+mrb_show_copyright(mrb_state *mrb)
+{
+ printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), MRB_SYM(MRUBY_COPYRIGHT)), stdout);
+}
+
#else
void
mrb_core_init_printabort(void)
@@ -57,22 +77,19 @@ MRB_API void
mrb_p(mrb_state *mrb, mrb_value obj)
{
}
-#endif
MRB_API void
mrb_print_error(mrb_state *mrb)
{
- mrb_print_backtrace(mrb);
}
MRB_API void
mrb_show_version(mrb_state *mrb)
{
- printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), MRB_SYM(MRUBY_DESCRIPTION)), stdout);
}
MRB_API void
mrb_show_copyright(mrb_state *mrb)
{
- printstr(mrb_const_get(mrb, mrb_obj_value(mrb->object_class), MRB_SYM(MRUBY_COPYRIGHT)), stdout);
}
+#endif

print.c: fix a compilation errors with `MRB_NO_STDIO`; fix #5361