mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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
This commit is contained in:
+2
-2
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user