diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-23 07:56:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-23 07:56:15 +0000 |
commit | 14f7df242f75c32472ee1f0dc1eec142c26b2547 (patch) | |
tree | 525edf882fcec3e89682ebf27bd7c83aaa04e121 | |
parent | de26aaa57a5445ad2ac37ea5f60e9394d0eed522 (diff) | |
download | ruby-14f7df242f75c32472ee1f0dc1eec142c26b2547.tar.gz |
* include/ruby/ruby.h (CONST_ID_CACHE, rb_intern_const): suppress
warnings with -Wconversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/ruby/ruby.h | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Sun May 23 16:56:11 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * include/ruby/ruby.h (CONST_ID_CACHE, rb_intern_const): suppress + warnings with -Wconversion. + Sun May 23 07:08:34 2010 Aaron Patterson <aaron@tenderlovemaking.com> * ext/psych/lib/psych/json/stream.rb: adding a JSON streaming API diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 989a2851b0..37c3e47e40 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); |