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

ruby-changes:18221

From: akr <ko1@a...>
Date: Sat, 18 Dec 2010 14:44:43 +0900 (JST)
Subject: [ruby-changes:18221] Ruby:r30242 (trunk): * load.c: parenthesize macro arguments.

akr	2010-12-18 14:43:01 +0900 (Sat, 18 Dec 2010)

  New Revision: 30242

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

  Log:
    * load.c: parenthesize macro arguments.

  Modified files:
    trunk/ChangeLog
    trunk/load.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 30241)
+++ ChangeLog	(revision 30242)
@@ -1,3 +1,7 @@
+Sat Dec 18 14:42:29 2010  Tanaka Akira  <akr@f...>
+
+	* load.c: parenthesize macro arguments.
+
 Sat Dec 18 10:07:04 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* compile.c (setup_args, iseq_compile_each): optimize AMPER LAMBDA
Index: load.c
===================================================================
--- load.c	(revision 30241)
+++ load.c	(revision 30242)
@@ -9,12 +9,12 @@
 
 VALUE ruby_dln_librefs;
 
-#define IS_RBEXT(e) (strcmp(e, ".rb") == 0)
-#define IS_SOEXT(e) (strcmp(e, ".so") == 0 || strcmp(e, ".o") == 0)
+#define IS_RBEXT(e) (strcmp((e), ".rb") == 0)
+#define IS_SOEXT(e) (strcmp((e), ".so") == 0 || strcmp((e), ".o") == 0)
 #ifdef DLEXT2
-#define IS_DLEXT(e) (strcmp(e, DLEXT) == 0 || strcmp(e, DLEXT2) == 0)
+#define IS_DLEXT(e) (strcmp((e), DLEXT) == 0 || strcmp((e), DLEXT2) == 0)
 #else
-#define IS_DLEXT(e) (strcmp(e, DLEXT) == 0)
+#define IS_DLEXT(e) (strcmp((e), DLEXT) == 0)
 #endif
 
 
@@ -745,7 +745,7 @@
 Init_load()
 {
 #undef rb_intern
-#define rb_intern(str) rb_intern2(str, strlen(str))
+#define rb_intern(str) rb_intern2((str), strlen(str))
     rb_vm_t *vm = GET_VM();
     static const char var_load_path[] = "$:";
     ID id_load_path = rb_intern2(var_load_path, sizeof(var_load_path)-1);

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

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