From eb239b43344665308eafc105b5a7318486f82410 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 31 Mar 2011 11:42:23 +0000 Subject: [PATCH] * ext/strscan/strscan.c: parenthesize macro arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ext/strscan/strscan.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57c6c8ba3b..5aa2745db3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Mar 31 20:42:05 2011 Tanaka Akira + + * ext/strscan/strscan.c: parenthesize macro arguments. + Thu Mar 31 18:06:12 2011 Shugo Maeda * vm_insnhelper.c (vm_get_ev_const): should ignore crefs with diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c index 41e08f6e16..dcad837a37 100644 --- a/ext/strscan/strscan.c +++ b/ext/strscan/strscan.c @@ -51,8 +51,8 @@ struct strscanner #define EOS_P(s) ((s)->curr >= RSTRING_LEN(p->str)) #define GET_SCANNER(obj,var) do {\ - Data_Get_Struct(obj, struct strscanner, var);\ - if (NIL_P(var->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\ + Data_Get_Struct((obj), struct strscanner, (var));\ + if (NIL_P((var)->str)) rb_raise(rb_eArgError, "uninitialized StringScanner object");\ } while (0) /* =======================================================================