Ruby 3.4.5p51 (2025-07-16 revision 20cda200d3ce092571d0b5d342dadca69636cb0f)
|
Arithmetic conversion between C's long long and Ruby's. More...
#include "ruby/internal/value.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/special_consts.h"
#include "ruby/backward/2/long_long.h"
Go to the source code of this file.
Macros | |
#define | RB_LL2NUM rb_ll2num_inline |
Just another name of rb_ll2num_inline. | |
#define | RB_ULL2NUM rb_ull2num_inline |
Just another name of rb_ull2num_inline. | |
#define | LL2NUM RB_LL2NUM |
Old name of RB_LL2NUM. | |
#define | ULL2NUM RB_ULL2NUM |
Old name of RB_ULL2NUM. | |
#define | RB_NUM2LL rb_num2ll_inline |
Just another name of rb_num2ll_inline. | |
#define | RB_NUM2ULL rb_num2ull_inline |
Just another name of rb_num2ull_inline. | |
#define | NUM2LL RB_NUM2LL |
Old name of RB_NUM2LL. | |
#define | NUM2ULL RB_NUM2ULL |
Old name of RB_NUM2ULL. |
Functions | |
VALUE | rb_ll2inum (LONG_LONG num) |
Converts a C's long long into an instance of rb_cInteger. | |
VALUE | rb_ull2inum (unsigned LONG_LONG num) |
Converts a C's unsigned long long into an instance of rb_cInteger. | |
LONG_LONG | rb_num2ll (VALUE num) |
Converts an instance of rb_cNumeric into C's long long. | |
unsigned LONG_LONG | rb_num2ull (VALUE num) |
Converts an instance of rb_cNumeric into C's unsigned long long. | |
static VALUE | rb_ll2num_inline (LONG_LONG n) |
Converts a C's long long into an instance of rb_cInteger. | |
static VALUE | rb_ull2num_inline (unsigned LONG_LONG n) |
Converts a C's unsigned long long into an instance of rb_cInteger. | |
static LONG_LONG | rb_num2ll_inline (VALUE x) |
Converts an instance of rb_cNumeric into C's long long. | |
static unsigned LONG_LONG | rb_num2ull_inline (VALUE x) |
Converts an instance of rb_cNumeric into C's unsigned long long. |
Arithmetic conversion between C's long long and Ruby's.
Definition in file long_long.h.
#define RB_LL2NUM rb_ll2num_inline |
Just another name of rb_ll2num_inline.
Definition at line 28 of file long_long.h.
#define RB_NUM2LL rb_num2ll_inline |
Just another name of rb_num2ll_inline.
Definition at line 32 of file long_long.h.
#define RB_NUM2ULL rb_num2ull_inline |
Just another name of rb_num2ull_inline.
Definition at line 33 of file long_long.h.
#define RB_ULL2NUM rb_ull2num_inline |
Just another name of rb_ull2num_inline.
Definition at line 29 of file long_long.h.
Converts a C's long long into an instance of rb_cInteger.
[in] | num | Arbitrary long long value. |
Referenced by rb_ll2inum(), and rb_ll2num_inline().
Converts a C's long long into an instance of rb_cInteger.
[in] | n | Arbitrary long long value. |
Definition at line 82 of file long_long.h.
Referenced by rb_ll2num_inline().
Converts an instance of rb_cNumeric into C's long long.
[in] | num | Something numeric. |
rb_eTypeError | `num` is not a numeric. |
rb_eRangeError | `num` is out of range of `long long`. |
Referenced by rb_num2ll(), and rb_num2ll_inline().
Converts an instance of rb_cNumeric into C's long long.
[in] | x | Something numeric. |
rb_eTypeError | `x` is not a numeric. |
rb_eRangeError | `x` is out of range of `long long`. |
Definition at line 110 of file long_long.h.
Converts an instance of rb_cNumeric into C's unsigned long long.
[in] | num | Something numeric. |
rb_eTypeError | `num` is not a numeric. |
rb_eRangeError | `num` is out of range of `unsigned long long`. |
Referenced by rb_num2ull(), and rb_num2ull_inline().
Converts an instance of rb_cNumeric into C's unsigned long long.
[in] | x | Something numeric. |
rb_eTypeError | `x` is not a numeric. |
rb_eRangeError | `x` is out of range of `unsigned long long`. |
Definition at line 127 of file long_long.h.
Converts a C's unsigned long long into an instance of rb_cInteger.
[in] | num | Arbitrary unsigned long long value. |
Referenced by rb_ull2inum(), and rb_ull2num_inline().
Converts a C's unsigned long long into an instance of rb_cInteger.
[in] | n | Arbitrary unsigned long long value. |
Definition at line 95 of file long_long.h.