Ruby 3.4.5p51 (2025-07-16 revision 20cda200d3ce092571d0b5d342dadca69636cb0f)
|
Handling of integers formerly known as Fixnums. More...
#include "ruby/backward/2/limits.h"
Go to the source code of this file.
Macros | |
#define | FIXABLE RB_FIXABLE |
Old name of RB_FIXABLE. | |
#define | FIXNUM_MAX RUBY_FIXNUM_MAX |
Old name of RUBY_FIXNUM_MAX. | |
#define | FIXNUM_MIN RUBY_FIXNUM_MIN |
Old name of RUBY_FIXNUM_MIN. | |
#define | NEGFIXABLE RB_NEGFIXABLE |
Old name of RB_NEGFIXABLE. | |
#define | POSFIXABLE RB_POSFIXABLE |
Old name of RB_POSFIXABLE. | |
#define | RB_POSFIXABLE(_) |
Checks if the passed value is in range of fixnum, assuming it is a positive number. | |
#define | RB_NEGFIXABLE(_) |
Checks if the passed value is in range of fixnum, assuming it is a negative number. | |
#define | RB_FIXABLE(_) |
Checks if the passed value is in range of fixnum. | |
#define | RUBY_FIXNUM_MAX (LONG_MAX / 2) |
Maximum possible value that a fixnum can represent. | |
#define | RUBY_FIXNUM_MIN (LONG_MIN / 2) |
Minimum possible value that a fixnum can represent. |
Handling of integers formerly known as Fixnums.
Definition in file fixnum.h.
#define RB_FIXABLE | ( | _ | ) |
Checks if the passed value is in range of fixnum.
Definition at line 52 of file fixnum.h.
Referenced by RB_INT2FIX(), rb_int2num_inline(), rb_long2num_inline(), and RB_ST2FIX().
#define RB_NEGFIXABLE | ( | _ | ) |
Checks if the passed value is in range of fixnum, assuming it is a negative number.
This is an implementation of RB_FIXABLE. Rarely used stand alone.
#define RB_POSFIXABLE | ( | _ | ) |
Checks if the passed value is in range of fixnum, assuming it is a positive number.
Can sometimes be useful for C's unsigned integer types.
Definition at line 43 of file fixnum.h.
Referenced by rb_uint2num_inline(), and rb_ulong2num_inline().
#define RUBY_FIXNUM_MAX (LONG_MAX / 2) |
Maximum possible value that a fixnum can represent.
Definition at line 55 of file fixnum.h.
Referenced by RB_ST2FIX().
#define RUBY_FIXNUM_MIN (LONG_MIN / 2) |
Minimum possible value that a fixnum can represent.
Definition at line 58 of file fixnum.h.
Referenced by RB_ST2FIX().