summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMitchell Blank Jr <[email protected]>2012-05-20 20:13:31 -0700
committerMitchell Blank Jr <[email protected]>2012-05-20 20:13:31 -0700
commit2120e5cbd66afe5b04502ea198d9d589d14c2c68 (patch)
treebf3fa83e7fd51f0de68be7075b3318334afeef2f
parent21bd5d792418910978266563a46974412bba8e0b (diff)
downloadmruby-2120e5cbd66afe5b04502ea198d9d589d14c2c68.tar.gz
mruby-2120e5cbd66afe5b04502ea198d9d589d14c2c68.zip
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
-rw-r--r--src/time.c4
1 files changed, 2 insertions, 2 deletions
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));