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

ruby-changes:27552

From: kazu <ko1@a...>
Date: Wed, 6 Mar 2013 01:31:31 +0900 (JST)
Subject: [ruby-changes:27552] kazu:r39604 (trunk): use INT2FIX(0) instead of INT2NUM(0).

kazu	2013-03-06 01:31:19 +0900 (Wed, 06 Mar 2013)

  New Revision: 39604

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

  Log:
    use INT2FIX(0) instead of INT2NUM(0).

  Modified files:
    trunk/ChangeLog
    trunk/enumerator.c
    trunk/ext/bigdecimal/bigdecimal.c
    trunk/ext/fiddle/function.c
    trunk/ext/openssl/ossl_x509store.c
    trunk/process.c
    trunk/transcode.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 39603)
+++ ChangeLog	(revision 39604)
@@ -1,3 +1,18 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Mar  6 01:19:28 2013  Kazuhiro NISHIYAMA  <zn@m...>
+
+	* enumerator.c (enumerator_with_index, lazy_take): use INT2FIX(0)
+	  instead of INT2NUM(0).
+
+	* ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
+
+	* ext/fiddle/function.c (function_call): ditto.
+
+	* ext/openssl/ossl_x509store.c (ossl_x509store_initialize): ditto.
+
+	* process.c (proc_getsid): ditto.
+
+	* transcode.c (econv_finish): ditto.
+
 Tue Mar  5 21:36:43 2013  Nobuyoshi Nakada  <nobu@r...>
 
 	* class.c (rb_prepend_module): check redefinition of built-in optimized
Index: enumerator.c
===================================================================
--- enumerator.c	(revision 39603)
+++ enumerator.c	(revision 39604)
@@ -493,7 +493,7 @@ enumerator_with_index(int argc, VALUE *a https://github.com/ruby/ruby/blob/trunk/enumerator.c#L493
     rb_scan_args(argc, argv, "01", &memo);
     RETURN_SIZED_ENUMERATOR(obj, argc, argv, enumerator_size);
     if (NIL_P(memo))
-	memo = INT2NUM(0);
+	memo = INT2FIX(0);
     return enumerator_block_call(obj, enumerator_with_index_i, (VALUE)&memo);
 }
 
@@ -1742,7 +1742,7 @@ lazy_take(VALUE obj, VALUE n) https://github.com/ruby/ruby/blob/trunk/enumerator.c#L1742
 	rb_raise(rb_eArgError, "attempt to take negative size");
     }
     if (len == 0) {
-	VALUE len = INT2NUM(0);
+	VALUE len = INT2FIX(0);
 	lazy = lazy_to_enum_i(obj, sym_cycle, 1, &len, 0);
     }
     else {
Index: process.c
===================================================================
--- process.c	(revision 39603)
+++ process.c	(revision 39604)
@@ -4248,7 +4248,7 @@ proc_getsid(int argc, VALUE *argv) https://github.com/ruby/ruby/blob/trunk/process.c#L4248
     rb_scan_args(argc, argv, "01", &pid);
 
     if (NIL_P(pid))
-	pid = INT2NUM(0);
+	pid = INT2FIX(0);
 
     sid = getsid(NUM2PIDT(pid));
     if (sid < 0) rb_sys_fail(0);
Index: ext/bigdecimal/bigdecimal.c
===================================================================
--- ext/bigdecimal/bigdecimal.c	(revision 39603)
+++ ext/bigdecimal/bigdecimal.c	(revision 39604)
@@ -2669,7 +2669,7 @@ BigMath_s_exp(VALUE klass, VALUE x, VALU https://github.com/ruby/ruby/blob/trunk/ext/bigdecimal/bigdecimal.c#L2669
     }
     if (infinite) {
 	if (negative) {
-	    return ToValue(GetVpValueWithPrec(INT2NUM(0), prec, 1));
+	    return ToValue(GetVpValueWithPrec(INT2FIX(0), prec, 1));
 	}
 	else {
 	    Real* vy;
Index: ext/openssl/ossl_x509store.c
===================================================================
--- ext/openssl/ossl_x509store.c	(revision 39603)
+++ ext/openssl/ossl_x509store.c	(revision 39604)
@@ -135,9 +135,9 @@ ossl_x509store_initialize(int argc, VALU https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl_x509store.c#L135
     ossl_x509store_set_vfy_cb(self, Qnil);
 
 #if (OPENSSL_VERSION_NUMBER < 0x00907000L)
-    rb_iv_set(self, "@flags", INT2NUM(0));
-    rb_iv_set(self, "@purpose", INT2NUM(0));
-    rb_iv_set(self, "@trust", INT2NUM(0));
+    rb_iv_set(self, "@flags", INT2FIX(0));
+    rb_iv_set(self, "@purpose", INT2FIX(0));
+    rb_iv_set(self, "@trust", INT2FIX(0));
 #endif
 
     /* last verification status */
Index: ext/fiddle/function.c
===================================================================
--- ext/fiddle/function.c	(revision 39603)
+++ ext/fiddle/function.c	(revision 39604)
@@ -135,9 +135,9 @@ function_call(int argc, VALUE argv[], VA https://github.com/ruby/ruby/blob/trunk/ext/fiddle/function.c#L135
 
 	if(NUM2INT(type) == TYPE_VOIDP) {
 	    if(NIL_P(src)) {
-		src = INT2NUM(0);
+		src = INT2FIX(0);
 	    } else if(cPointer != CLASS_OF(src)) {
-	        src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
+		src = rb_funcall(cPointer, rb_intern("[]"), 1, src);
 	    }
 	    src = rb_Integer(src);
 	}
Index: transcode.c
===================================================================
--- transcode.c	(revision 39603)
+++ transcode.c	(revision 39604)
@@ -3864,7 +3864,7 @@ econv_finish(VALUE self) https://github.com/ruby/ruby/blob/trunk/transcode.c#L3864
     av[1] = dst;
     av[2] = Qnil;
     av[3] = Qnil;
-    av[4] = INT2NUM(0);
+    av[4] = INT2FIX(0);
     ac = 5;
 
     ret = econv_primitive_convert(ac, av, self);

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

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