errno.c: bundled mrbgem need not to support mruby 1.x.

parent 0f582979
...@@ -10,14 +10,6 @@ ...@@ -10,14 +10,6 @@
#include <string.h> #include <string.h>
#include <mruby/presym.h> #include <mruby/presym.h>
#if MRUBY_RELEASE_NO < 10000
static struct RClass *
mrb_module_get(mrb_state *mrb, const char *name)
{
return mrb_class_get(mrb, name);
}
#endif
static mrb_value static mrb_value
mrb_sce_init(mrb_state *mrb, mrb_value self) mrb_sce_init(mrb_state *mrb, mrb_value self)
{ {
...@@ -66,11 +58,7 @@ mrb_sce_errno(mrb_state *mrb, mrb_value self) ...@@ -66,11 +58,7 @@ mrb_sce_errno(mrb_state *mrb, mrb_value self)
c = mrb_class(mrb, self); c = mrb_class(mrb, self);
sym = MRB_SYM(Errno); sym = MRB_SYM(Errno);
#if MRUBY_RELEASE_NO < 10000
if (mrb_const_defined_at(mrb, c, sym)) {
#else
if (mrb_const_defined_at(mrb, mrb_obj_value(c), sym)) { if (mrb_const_defined_at(mrb, mrb_obj_value(c), sym)) {
#endif
return mrb_const_get(mrb, mrb_obj_value(c), sym); return mrb_const_get(mrb, mrb_obj_value(c), sym);
} else { } else {
sym = MRB_SYM(errno); sym = MRB_SYM(errno);
......
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