aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/ruby/ruby.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index ff1c463a29..60dbf79ec1 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -300,24 +300,17 @@ VALUE rb_ull2inum(unsigned LONG_LONG);
# endif
#endif
-#if SIZEOF_INT < SIZEOF_VALUE
-NORETURN(void rb_out_of_int(SIGNED_VALUE num));
-#endif
-
-#if SIZEOF_INT < SIZEOF_LONG
static inline int
-rb_long2int_inline(long n)
+rb_long2int(long n)
{
int i = (int)n;
+#if SIZEOF_INT < SIZEOF_LONG
+ NORETURN(void rb_out_of_int(SIGNED_VALUE num));
if ((long)i != n)
rb_out_of_int(n);
-
+#endif
return i;
}
-#define rb_long2int(n) rb_long2int_inline(n)
-#else
-#define rb_long2int(n) ((int)(n))
-#endif
#ifndef PIDT2NUM
#define PIDT2NUM(v) LONG2NUM(v)