From 2120e5cbd66afe5b04502ea198d9d589d14c2c68 Mon Sep 17 00:00:00 2001 From: Mitchell Blank Jr Date: Sun, 20 May 2012 20:13:31 -0700 Subject: 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 --- src/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/time.c b/src/time.c index b0a74d0d1..7914d64af 100644 --- a/src/time.c +++ b/src/time.c @@ -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)); -- cgit v1.2.3