diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | include/ruby/ruby.h | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -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 diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index c9544fa510..03b1a1d1c4 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -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)) |