summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-04 13:54:10 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-04 13:54:10 +0000
commit61b245cc4044bfda14fa66a4a3fce457d7b43b21 (patch)
tree14098388ecbf1a7da7218172109f653e6beed0c9
parentf674d8623df4392bdcb34800f39ee529e6e341b4 (diff)
* include/ruby/ruby.h (FIX2LONG): Parenthesize the macro body.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--include/ruby/ruby.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c4ce9f3..4707883 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Apr 4 22:53:23 2013 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/ruby.h (FIX2LONG): Parenthesize the macro body.
+
Thu Apr 4 22:32:32 2013 Tanaka Akira <akr@fsij.org>
* time.c (time_strftime): Describe %L and %N truncates digits under
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index d6a0a92..3822942 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -336,7 +336,7 @@ rb_long2int_inline(long n)
#define MODET2NUM(v) INT2NUM(v)
#endif
-#define FIX2LONG(x) (long)RSHIFT((SIGNED_VALUE)(x),1)
+#define FIX2LONG(x) ((long)RSHIFT((SIGNED_VALUE)(x),1))
#define FIX2ULONG(x) ((unsigned long)FIX2LONG(x))
#define FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&FIXNUM_FLAG)
#define POSFIXABLE(f) ((f) < FIXNUM_MAX+1)