summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-09 04:06:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-09 04:06:37 +0000
commitfe963a451086d705c14da39fcf687b5e68f34e62 (patch)
treeb74775be1b1c2d06bd014bbe4d9b13e8d5b38dcc /time.c
parent913fdf25bcd724ba3f5dbd77e05bf10c3ebd5b96 (diff)
* time.c (rb_time_timeval, rb_time_timespec): typed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/time.c b/time.c
index 74b803b882..b12dbdcc52 100644
--- a/time.c
+++ b/time.c
@@ -1647,7 +1647,7 @@ rb_time_timeval(VALUE time)
struct timeval t;
struct timespec ts;
- if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
+ if (IsTimeval(time)) {
GetTimeval(time, tobj);
ts = timexv2timespec(tobj->timexv);
t.tv_sec = (TYPEOF_TIMEVAL_TV_SEC)ts.tv_sec;
@@ -1663,7 +1663,7 @@ rb_time_timespec(VALUE time)
struct time_object *tobj;
struct timespec t;
- if (TYPE(time) == T_DATA && RDATA(time)->dfree == time_free) {
+ if (IsTimeval(time)) {
GetTimeval(time, tobj);
t = timexv2timespec(tobj->timexv);
return t;