File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -558,12 +558,15 @@ enum ruby_value_type {
558
558
int rb_type (VALUE value );
559
559
#define TYPE (x ) rb_type((VALUE)(x))
560
560
561
- /* Truffle: Simplify the RB_FLOAT_TYPE_P check based on our representation of Floats.
561
+ #ifdef TRUFFLERUBY
562
+ /* TruffleRuby: Simplify the RB_FLOAT_TYPE_P check based on our representation of Floats. */
563
+ #define RB_FLOAT_TYPE_P (obj ) (\
564
+ polyglot_as_boolean(polyglot_invoke(RUBY_CEXT, "RB_FLOAT_TYPE_P", rb_tr_unwrap(value))))
565
+ #else
562
566
#define RB_FLOAT_TYPE_P (obj ) (\
563
567
RB_FLONUM_P(obj) || \
564
568
(!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT))
565
- */
566
- MUST_INLINE int RB_FLOAT_TYPE_P (VALUE obj );
569
+ #endif
567
570
568
571
bool RB_TYPE_P (VALUE value , int type );
569
572
Original file line number Diff line number Diff line change @@ -419,10 +419,6 @@ int RB_FIXNUM_P(VALUE value) {
419
419
return polyglot_as_boolean (RUBY_CEXT_INVOKE_NO_WRAP ("RB_FIXNUM_P" , value ));
420
420
}
421
421
422
- int RB_FLOAT_TYPE_P (VALUE value ) {
423
- return polyglot_as_boolean (RUBY_CEXT_INVOKE_NO_WRAP ("RB_FLOAT_TYPE_P" , value ));
424
- }
425
-
426
422
int RTEST (VALUE value ) {
427
423
return value != NULL && polyglot_as_boolean (RUBY_CEXT_INVOKE_NO_WRAP ("RTEST" , value ));
428
424
}
You can’t perform that action at this time.
0 commit comments