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

ruby-changes:13286

From: nobu <ko1@a...>
Date: Wed, 23 Sep 2009 12:39:53 +0900 (JST)
Subject: [ruby-changes:13286] Ruby:r25049 (trunk): * range.c: fixed type.

nobu	2009-09-23 12:39:44 +0900 (Wed, 23 Sep 2009)

  New Revision: 25049

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

  Log:
    * range.c: fixed type.

  Modified files:
    trunk/range.c

Index: range.c
===================================================================
--- range.c	(revision 25048)
+++ range.c	(revision 25049)
@@ -151,10 +151,10 @@
     VALUE r = rb_funcall(a, id_cmp, 1, b);
 
     if (NIL_P(r))
-	return Qfalse;
+	return (int)Qfalse;
     if (rb_cmpint(r, a, b) < 0)
-	return Qtrue;
-    return Qfalse;
+	return (int)Qtrue;
+    return (int)Qfalse;
 }
 
 static int
@@ -164,13 +164,13 @@
     VALUE r = rb_funcall(a, id_cmp, 1, b);
 
     if (NIL_P(r))
-	return Qfalse;
+	return (int)Qfalse;
     c = rb_cmpint(r, a, b);
     if (c == 0)
 	return (int)INT2FIX(0);
     if (c < 0)
-	return Qtrue;
-    return Qfalse;
+	return (int)Qtrue;
+    return (int)Qfalse;
 }
 
 
@@ -677,8 +677,8 @@
 	excl = EXCL(range);
     }
     else {
-	if (!rb_respond_to(range, id_beg)) return Qfalse;
-	if (!rb_respond_to(range, id_end)) return Qfalse;
+	if (!rb_respond_to(range, id_beg)) return (int)Qfalse;
+	if (!rb_respond_to(range, id_end)) return (int)Qfalse;
 	b = rb_funcall(range, id_beg, 0);
 	e = rb_funcall(range, id_end, 0);
 	excl = RTEST(rb_funcall(range, rb_intern("exclude_end?"), 0));
@@ -686,7 +686,7 @@
     *begp = b;
     *endp = e;
     *exclp = excl;
-    return Qtrue;
+    return (int)Qtrue;
 }
 
 VALUE

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

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