diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-05-21 17:16:33 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-05-21 17:16:33 +0900 |
| commit | 826386a13adf0d645e992a862a1d3f37dc1b4853 (patch) | |
| tree | 210d504f3e5706cc78070458cb8ccbbd1e1e39b3 /src | |
| parent | 1dbfc3999753eabaa15b461a23009086ceaa215a (diff) | |
| download | mruby-826386a13adf0d645e992a862a1d3f37dc1b4853.tar.gz mruby-826386a13adf0d645e992a862a1d3f37dc1b4853.zip | |
use mrb_int for struct tm fractions
Diffstat (limited to 'src')
| -rw-r--r-- | src/time.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/time.c b/src/time.c index b0a74d0d1..293eef583 100644 --- a/src/time.c +++ b/src/time.c @@ -266,8 +266,7 @@ time_mktime(mrb_state *mrb, mrb_int ayear, mrb_int amonth, mrb_int aday, static mrb_value mrb_time_gm(mrb_state *mrb, mrb_value self) { - mrb_int ayear = 0.0, amonth = 1.0, aday = 1.0, ahour = 0.0, - amin = 0.0, asec = 0.0, ausec = 0.0; + mrb_int ayear = 0, amonth = 1, aday = 1, ahour = 0, amin = 0, asec = 0, ausec = 0; mrb_get_args(mrb, "iiiiiii", &ayear, &amonth, &aday, &ahour, &amin, &asec, &ausec); @@ -281,10 +280,9 @@ 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, - amin = 0.0, asec = 0.0, ausec = 0.0; + mrb_int ayear = 0, amonth = 1, aday = 1, ahour = 0, amin = 0, asec = 0, ausec = 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)); |
