summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-22 11:10:34 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-03-22 11:10:34 +0000
commit4520a3408afe2f30c4513ace4a00107c6a547ea3 (patch)
treec7bb44367a4b1b7e7b9bc72b5a4b1e5d99e9d390
parent9c1a7bf74a78e9d888248fa67e4129f24a89803b (diff)
* ext/psych/parser.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--ext/psych/parser.c4
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4034ff1536..16368c2d0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-Sun Mar 20 12:43:12 2011 Tanaka Akira <akr@fsij.org>
+Tue Mar 22 20:10:04 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/psych/parser.c: parenthesize macro arguments.
+
+Tue Mar 22 20:10:01 2011 Tanaka Akira <akr@fsij.org>
* ext/openssl/ruby_missing.h: parenthesize macro arguments.
diff --git a/ext/psych/parser.c b/ext/psych/parser.c
index 7bfdf4af90..f0751051a1 100644
--- a/ext/psych/parser.c
+++ b/ext/psych/parser.c
@@ -19,9 +19,9 @@ static ID id_end_mapping;
#define PSYCH_TRANSCODE(_str, _yaml_enc, _internal_enc) \
do { \
- rb_enc_associate_index(_str, _yaml_enc); \
+ rb_enc_associate_index((_str), (_yaml_enc)); \
if(_internal_enc) \
- _str = rb_str_export_to_enc(_str, _internal_enc); \
+ (_str) = rb_str_export_to_enc((_str), (_internal_enc)); \
} while (0)
static int io_reader(void * data, unsigned char *buf, size_t size, size_t *read)