diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-08 08:59:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-11-08 08:59:28 +0000 |
commit | 6bb4ddcba58fa225d092223c33403a78441be5cc (patch) | |
tree | 889b9e1cee21b46da19d20f2fcd60800cebbae44 /include | |
parent | 7c7514b206a0ac94f107395eef991d2eea4072a7 (diff) |
* 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
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/ruby.h | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |