From de7161526014b781468cea5d84411e23be945f79 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 5 Jan 2000 04:41:21 +0000 Subject: 20000105 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'time.c') diff --git a/time.c b/time.c index 4d18827597..65e479a5f6 100644 --- a/time.c +++ b/time.c @@ -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"); } -- cgit v1.2.3