Commit 2120e5cb authored by Mitchell Blank Jr's avatar Mitchell Blank Jr

make mrb_time_local() arguments consistent

* mrb_time_gm() uses mrb_int
* Same for mrb_time_initialize()
* The parameters to time_mktime() are mrb_int, and that's what these values are passed to

So I don't see why mrb_time_local() works on mrb_float instead.  Lets make
it consistent with the other methods defined in time.c
parent 21bd5d79
......@@ -281,10 +281,10 @@ mrb_time_gm(mrb_state *mrb, mrb_value self)
static mrb_value
mrb_time_local(mrb_state *mrb, mrb_value self)
{
mrb_float ayear = 0.0, amonth = 1.0, aday = 1.0, ahour = 0.0,
mrb_int ayear = 0.0, amonth = 1.0, aday = 1.0, ahour = 0.0,
amin = 0.0, asec = 0.0, ausec = 0.0;
mrb_get_args(mrb, "fffffff",
mrb_get_args(mrb, "iiiiiii",
&ayear, &amonth, &aday, &ahour, &amin, &asec, &ausec);
return mrb_time_wrap(mrb, mrb_class_ptr(self),
time_mktime(mrb, ayear, amonth, aday, ahour, amin, asec, ausec, MRB_TIMEZONE_LOCAL));
......
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