* include/ruby/ruby.h (rb_long2int): define as a macro always, so

that cpp conditionals can tell if it is provided.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2011-11-08 08:59:28 +00:00
parent 7c7514b206
commit 6bb4ddcba5
2 changed files with 7 additions and 1 deletions

View file

@ -302,7 +302,8 @@ NORETURN(void rb_out_of_int(SIGNED_VALUE num));
#define rb_long2int(n) __extension__ ({long i2l_n = (n); rb_long2int_internal(i2l_n, i2l_i); i2l_i;})
#else
static inline int
rb_long2int(long n) {rb_long2int_internal(n, i); return i;}
rb_long2int_inline(long n) {rb_long2int_internal(n, i); return i;}
#define rb_long2int(n) rb_long2int_inline(n)
#endif
#else
#define rb_long2int(n) ((int)(n))