diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-03-21 16:59:55 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-03-21 16:59:55 +0900 |
commit | 5b287481befe03cc3e3dbc4b5571e21dbc523bae (patch) | |
tree | 853e859aa58ac31d7df6df3a55c9aaf5d2fdf9e7 /internal/compar.h | |
parent | 6f0446785b537994bceb9fc8574cdaa9b59cbef6 (diff) |
Removed non-RUBY_INTEGER_UNIFICATION code
Diffstat (limited to 'internal/compar.h')
-rw-r--r-- | internal/compar.h | 10 |
1 files changed, 2 insertions, 8 deletions
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) : \ |