From 5b287481befe03cc3e3dbc4b5571e21dbc523bae Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 21 Mar 2020 16:59:55 +0900 Subject: Removed non-RUBY_INTEGER_UNIFICATION code --- internal/compar.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'internal/compar.h') diff --git a/internal/compar.h b/internal/compar.h index 6a689ed11d..a2808d62be 100644 --- a/internal/compar.h +++ b/internal/compar.h @@ -9,18 +9,12 @@ * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ -#include "ruby/ruby.h" /* for RUBY_INTEGER_UNIFICATION */ #include "internal/vm.h" /* for rb_method_basic_definition_p */ #define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString) -#ifdef RUBY_INTEGER_UNIFICATION -# define rb_cFixnum rb_cInteger -# define rb_cBignum rb_cInteger -#endif - enum { - cmp_opt_Fixnum, + cmp_opt_Integer, cmp_opt_String, cmp_opt_Float, cmp_optimizable_count @@ -42,7 +36,7 @@ struct cmp_opt_data { ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type)))) #define OPTIMIZED_CMP(a, b, data) \ - ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Fixnum)) ? \ + ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Integer)) ? \ (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : \ (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? \ rb_str_cmp(a, b) : \ -- cgit v1.2.3