diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-05 04:41:21 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-01-05 04:41:21 +0000 |
commit | de7161526014b781468cea5d84411e23be945f79 (patch) | |
tree | ce7e90b3c16ce6246be9850c9b1ea1328992c0e7 /time.c | |
parent | a1d1b1516750c1047ceb7010f8f5ca34b358c7e3 (diff) |
20000105
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -6,7 +6,7 @@ $Date$ created at: Tue Dec 28 14:31:59 JST 1993 - Copyright (C) 1993-1999 Yukihiro Matsumoto + Copyright (C) 1993-2000 Yukihiro Matsumoto ************************************************/ @@ -188,7 +188,7 @@ obj2long(obj) VALUE obj; { if (TYPE(obj) == T_STRING) { - obj = rb_str2inum(RSTRING(obj)->ptr, 10); + obj = rb_str2inum(obj, 10); } return NUM2LONG(obj); @@ -470,15 +470,15 @@ static VALUE time_clone(time) VALUE time; { - VALUE obj; - struct time_object *tobj, *newtobj; + VALUE clone; + struct time_object *tobj, *tclone; GetTimeval(time, tobj); - obj = Data_Make_Struct(0, struct time_object, 0, free, newtobj); - CLONESETUP(obj, time); - MEMCPY(newtobj, tobj, struct time_object, 1); + clone = Data_Make_Struct(0, struct time_object, 0, free, tclone); + CLONESETUP(clone, time); + MEMCPY(tclone, tobj, struct time_object, 1); - return obj; + return clone; } static VALUE @@ -838,7 +838,7 @@ time_strftime(time, format) if (tobj->tm_got == 0) { time_get_tm(time, tobj->gmt); } - fmt = str2cstr(format, &len); + fmt = rb_str2cstr(format, &len); if (len == 0) { rb_warning("strftime called with empty format string"); } @@ -948,7 +948,7 @@ time_load(klass, str) struct tm tm; int i; - buf = str2cstr(str, &i); + buf = rb_str2cstr(str, &i); if (i != 8) { rb_raise(rb_eTypeError, "marshaled time format differ"); } |