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

ruby-changes:18061

From: akr <ko1@a...>
Date: Sun, 5 Dec 2010 10:39:48 +0900 (JST)
Subject: [ruby-changes:18061] Ruby:r30082 (trunk): * complex.c: parenthesize macro arguments.

akr	2010-12-05 10:37:16 +0900 (Sun, 05 Dec 2010)

  New Revision: 30082

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

  Log:
    * complex.c: parenthesize macro arguments.

  Modified files:
    trunk/ChangeLog
    trunk/complex.c

Index: complex.c
===================================================================
--- complex.c	(revision 30081)
+++ complex.c	(revision 30082)
@@ -28,7 +28,7 @@
 inline static VALUE \
 f_##n(VALUE x, VALUE y)\
 {\
-    return rb_funcall(x, op, 1, y);\
+    return rb_funcall(x, (op), 1, y);\
 }
 
 #define fun1(n) \
@@ -493,7 +493,7 @@
 imp1(exp)
 imp2(hypot)
 
-#define m_hypot(x,y) m_hypot_bang(x,y)
+#define m_hypot(x,y) m_hypot_bang((x),(y))
 
 extern VALUE rb_math_log(int argc, VALUE *argv);
 
@@ -1422,25 +1422,25 @@
 }
 
 #define id_match rb_intern("match")
-#define f_match(x,y) rb_funcall(x, id_match, 1, y)
+#define f_match(x,y) rb_funcall((x), id_match, 1, (y))
 
 #define id_aref rb_intern("[]")
-#define f_aref(x,y) rb_funcall(x, id_aref, 1, y)
+#define f_aref(x,y) rb_funcall((x), id_aref, 1, (y))
 
 #define id_post_match rb_intern("post_match")
-#define f_post_match(x) rb_funcall(x, id_post_match, 0)
+#define f_post_match(x) rb_funcall((x), id_post_match, 0)
 
 #define id_split rb_intern("split")
-#define f_split(x,y) rb_funcall(x, id_split, 1, y)
+#define f_split(x,y) rb_funcall((x), id_split, 1, (y))
 
 #define id_include_p rb_intern("include?")
-#define f_include_p(x,y) rb_funcall(x, id_include_p, 1, y)
+#define f_include_p(x,y) rb_funcall((x), id_include_p, 1, (y))
 
 #define id_count rb_intern("count")
-#define f_count(x,y) rb_funcall(x, id_count, 1, y)
+#define f_count(x,y) rb_funcall((x), id_count, 1, (y))
 
 #define id_gsub_bang rb_intern("gsub!")
-#define f_gsub_bang(x,y,z) rb_funcall(x, id_gsub_bang, 2, y, z)
+#define f_gsub_bang(x,y,z) rb_funcall((x), id_gsub_bang, 2, (y), (z))
 
 static VALUE
 string_to_c_internal(VALUE self)
@@ -1539,7 +1539,7 @@
 }
 
 #define id_gsub rb_intern("gsub")
-#define f_gsub(x,y,z) rb_funcall(x, id_gsub, 2, y, z)
+#define f_gsub(x,y,z) rb_funcall((x), id_gsub, 2, (y), (z))
 
 /*
  * call-seq:
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30081)
+++ ChangeLog	(revision 30082)
@@ -1,3 +1,7 @@
+Sun Dec  5 10:32:11 2010  Tanaka Akira  <akr@f...>
+
+	* complex.c: parenthesize macro arguments.
+
 Sat Dec  4 11:39:17 2010  Eric Hodel  <drbrain@s...>
 
 	* ext/openssl/ossl_x509ext.c (initialize): add documentation.

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

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