diff --git a/ChangeLog b/ChangeLog index 07a96958f6..915129e9e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat Dec 18 14:42:29 2010 Tanaka Akira + + * load.c: parenthesize macro arguments. + Sat Dec 18 10:07:04 2010 Nobuyoshi Nakada * compile.c (setup_args, iseq_compile_each): optimize AMPER LAMBDA diff --git a/load.c b/load.c index f27dcb4446..7f23183c1f 100644 --- a/load.c +++ b/load.c @@ -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 @@ void 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);