From b070762a9e7d7594af03c7efa68d6593f3e60e55 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 13 Jun 2016 11:34:56 +0000 Subject: Integer unification macro * include/ruby/ruby.h (RUBY_INTEGER_UNIFICATION): macro to tell if Integer is integrated. [ruby-core:75718][Bug #12427] * include/ruby/backward.h, internal.h (rb_cFixnum, rb_cBignum): fallback to rb_cInteger. * bignum.c, numeric.c, ext/json/generator/generator.{c,h}: use the macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/backward.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/ruby/backward.h') diff --git a/include/ruby/backward.h b/include/ruby/backward.h index 4574cb98da..5fe88a2725 100644 --- a/include/ruby/backward.h +++ b/include/ruby/backward.h @@ -17,4 +17,9 @@ ruby_show_copyright_to_die(int exitcode) (exit(ruby_show_copyright_to_die(EXIT_SUCCESS))) #endif +#ifdef RUBY_INTEGER_UNIFICATION +# define rb_cFixnum rb_cInteger +# define rb_cBignum rb_cInteger +#endif + #endif /* RUBY_RUBY_BACKWARD_H */ -- cgit v1.2.3