summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--include/ruby/encoding.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 52a9a2f5ae..6223f2f862 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Mar 12 09:15:14 2009 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/encoding.h: suppress warnings of overflow.
+
Thu Mar 12 05:49:05 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (warnflags): added some default flags,
diff --git a/include/ruby/encoding.h b/include/ruby/encoding.h
index b28ddc9a7f..db07498900 100644
--- a/include/ruby/encoding.h
+++ b/include/ruby/encoding.h
@@ -17,11 +17,11 @@
#define ENCODING_INLINE_MAX 1023
#define ENCODING_SHIFT (FL_USHIFT+10)
-#define ENCODING_MASK (ENCODING_INLINE_MAX<<ENCODING_SHIFT)
+#define ENCODING_MASK (((VALUE)ENCODING_INLINE_MAX)<<ENCODING_SHIFT)
#define ENCODING_SET_INLINED(obj,i) do {\
RBASIC(obj)->flags &= ~ENCODING_MASK;\
- RBASIC(obj)->flags |= (i) << ENCODING_SHIFT;\
+ RBASIC(obj)->flags |= (VALUE)(i) << ENCODING_SHIFT;\
} while (0)
#define ENCODING_SET(obj,i) do {\
VALUE rb_encoding_set_obj = (obj); \