[前][次][番号順一覧][スレッド一覧]

ruby-changes:24063

From: tadf <ko1@a...>
Date: Sat, 16 Jun 2012 18:49:30 +0900 (JST)
Subject: [ruby-changes:24063] tadf:r36114 (trunk): * ext/date/date_tmx.h: offset in struct tmx_funcs is now int.

tadf	2012-06-16 18:49:17 +0900 (Sat, 16 Jun 2012)

  New Revision: 36114

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36114

  Log:
    * ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
    * ext/date/date_strftime.c: ditto.
    * ext/date/date_core.c: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/ext/date/date_core.c
    trunk/ext/date/date_strftime.c
    trunk/ext/date/date_tmx.h

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36113)
+++ ChangeLog	(revision 36114)
@@ -1,3 +1,9 @@
+Sat Jun 16 18:46:57 2012  Tadayoshi Funaba  <tadf@d...>
+
+	* ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
+	* ext/date/date_strftime.c: ditto.
+	* ext/date/date_core.c: ditto.
+
 Sat Jun 16 18:31:46 2012  Nobuyoshi Nakada  <nobu@r...>
 
 	* eval.c (ruby_setup): set running state in the normal case before
Index: ext/date/date_core.c
===================================================================
--- ext/date/date_core.c	(revision 36113)
+++ ext/date/date_core.c	(revision 36114)
@@ -6813,10 +6813,10 @@
     return s;
 }
 
-static VALUE
+static int
 tmx_m_of(union DateData *x)
 {
-    return INT2FIX(m_of(x));
+    return m_of(x);
 }
 
 static char *
@@ -6842,7 +6842,7 @@
     (VALUE (*)(void *))m_sf_in_sec,
     (VALUE (*)(void *))tmx_m_secs,
     (VALUE (*)(void *))tmx_m_msecs,
-    (VALUE (*)(void *))tmx_m_of,
+    (int (*)(void *))tmx_m_of,
     (char *(*)(void *))tmx_m_zone
 };
 
@@ -8650,7 +8650,7 @@
 static VALUE
 time_to_time(VALUE self)
 {
-    return rb_funcall(self, rb_intern("getlocal"), 0);
+    return f_getlocal(self);
 }
 
 /*
Index: ext/date/date_strftime.c
===================================================================
--- ext/date/date_strftime.c	(revision 36113)
+++ ext/date/date_strftime.c	(revision 36114)
@@ -424,8 +424,7 @@
 		long off, aoff;
 		int hl, hw;
 
-		off = NUM2LONG(rb_funcall(tmx_offset, rb_intern("round"), 0));
-
+		off = tmx_offset;
 		aoff = off;
 		if (aoff < 0)
 		    aoff = -off;
Index: ext/date/date_tmx.h
===================================================================
--- ext/date/date_tmx.h	(revision 36113)
+++ ext/date/date_tmx.h	(revision 36114)
@@ -18,7 +18,7 @@
     VALUE (*sec_fraction)(void *dat);
     VALUE (*secs)(void *dat);
     VALUE (*msecs)(void *dat);
-    VALUE (*offset)(void *dat);
+    int (*offset)(void *dat);
     char *(*zone)(void *dat);
 };
 struct tmx {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]