remove alloc from Time class

parent b225e4cc
......@@ -174,13 +174,6 @@ mrb_time_make(mrb_state *mrb, struct RClass *c, double sec, double usec, enum mr
return mrb_time_wrap(mrb, c, time_alloc(mrb, sec, usec, timezone));
}
/* Allocates a mrb_time object and initializes it. */
static mrb_value
mrb_time_alloc(mrb_state *mrb, mrb_value cv)
{
return mrb_time_make(mrb, mrb_class_ptr(cv), 0, 0, MRB_TIMEZONE_NONE);
}
static struct mrb_time*
current_mrb_time(mrb_state *mrb)
{
......@@ -670,7 +663,6 @@ mrb_mruby_time_gem_init(mrb_state* mrb)
tc = mrb_define_class(mrb, "Time", mrb->object_class);
MRB_SET_INSTANCE_TT(tc, MRB_TT_DATA);
mrb_include_module(mrb, tc, mrb_class_get(mrb, "Comparable"));
mrb_define_class_method(mrb, tc, "alloc", mrb_time_alloc, MRB_ARGS_NONE());
mrb_define_class_method(mrb, tc, "at", mrb_time_at, MRB_ARGS_ANY()); /* 15.2.19.6.1 */
mrb_define_class_method(mrb, tc, "gm", mrb_time_gm, MRB_ARGS_ARG(1,6)); /* 15.2.19.6.2 */
mrb_define_class_method(mrb, tc, "local", mrb_time_local, MRB_ARGS_ARG(1,6)); /* 15.2.19.6.3 */
......
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