summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--ext/strscan/strscan.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 57c6c8b..5aa2745 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Mar 31 20:42:05 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/strscan/strscan.c: parenthesize macro arguments.
+
Thu Mar 31 18:06:12 2011 Shugo Maeda <shugo@ruby-lang.org>
* vm_insnhelper.c (vm_get_ev_const): should ignore crefs with
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index 41e08f6..dcad837 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)
/* =======================================================================