summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-23 08:16:40 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-23 08:16:40 +0000
commitce8257da3c66608001bfc2ab22fc89c60a92fbb6 (patch)
treebfc1084d3f07741df0b7c3ea7a671fb27b2f8fb0 /include
parent9376a51e1f752f5898db905ec3c277b60ba8d388 (diff)
* include/ruby/ruby.h (CONST_ID_CACHE, rb_intern_const): suppress
warnings with -Wconversion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@27965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 6057c5b17b..7c6e35bd14 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1070,7 +1070,7 @@ VALUE rb_id2str(ID);
{ \
static ID rb_intern_id_cache; \
if (!rb_intern_id_cache) \
- rb_intern_id_cache = rb_intern2(str, strlen(str)); \
+ rb_intern_id_cache = rb_intern2(str, (long)strlen(str)); \
result rb_intern_id_cache; \
}
#define CONST_ID(var, str) \
@@ -1084,10 +1084,10 @@ VALUE rb_id2str(ID);
rb_intern(str))
#define rb_intern_const(str) \
(__builtin_constant_p(str) ? \
- __extension__ (rb_intern2(str, strlen(str))) : \
+ __extension__ (rb_intern2(str, (long)strlen(str))) : \
(rb_intern)(str))
#else
-#define rb_intern_const(str) rb_intern2(str, strlen(str))
+#define rb_intern_const(str) rb_intern2(str, (long)strlen(str))
#endif
const char *rb_class2name(VALUE);