Project

General

Profile

Actions

Feature #15030

closed

Have T_INTEGER constant for checking Integer types in C API

Added by v0dro (Sameer Deshmukh) over 5 years ago. Updated over 5 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:88666]

Description

After Integer unification in Ruby 2.4, I think it makes sense to introduce a T_INTEGER
type that helps in directly testing if a Ruby object is an Integer in C API.

For example, currently we need to write RB_TYPE_P(obj, T_FIXNUM) for this purpose.
However since ruby 2.4 onwards deprecates Fixnum and Bignum, I think it makes sense
to have a T_INTEGER type so that one can write RB_TYPE_P(obj, T_INTEGER) directly
to test for both 64-bit and > 64-bit integers.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0