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 (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

@ -1,3 +1,8 @@
Tue Nov 8 17:59:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (rb_long2int): define as a macro always, so
that cpp conditionals can tell if it is provided.
Tue Nov 8 17:30:50 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp

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