1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2010-05-23 08:16:40 +00:00
parent 9376a51e1f
commit ce8257da3c
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Sun May 23 17:16:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (CONST_ID_CACHE, rb_intern_const): suppress
warnings with -Wconversion.
Sat May 22 06:46:45 2010 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* cont.c: revert FIBER_USE_NATIVE feature.

View file

@ -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);