Ruby
3.4.0dev (2024-12-06 revision 892c46283a5ea4179500d951c9d4866c0051f27b)
|
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. More... | |
#define | RB_ULL2NUM rb_ull2num_inline |
Just another name of rb_ull2num_inline. More... | |
#define | LL2NUM RB_LL2NUM |
Old name of RB_LL2NUM. More... | |
#define | ULL2NUM RB_ULL2NUM |
Old name of RB_ULL2NUM. More... | |
#define | RB_NUM2LL rb_num2ll_inline |
Just another name of rb_num2ll_inline. More... | |
#define | RB_NUM2ULL rb_num2ull_inline |
Just another name of rb_num2ull_inline. More... | |
#define | NUM2LL RB_NUM2LL |
Old name of RB_NUM2LL. More... | |
#define | NUM2ULL RB_NUM2ULL |
Old name of RB_NUM2ULL. More... | |
Functions | |
VALUE | rb_ll2inum (LONG_LONG num) |
Converts a C's long long into an instance of rb_cInteger. More... | |
VALUE | rb_ull2inum (unsigned LONG_LONG num) |
Converts a C's unsigned long long into an instance of rb_cInteger. More... | |
LONG_LONG | rb_num2ll (VALUE num) |
Converts an instance of rb_cNumeric into C's long long . More... | |
unsigned LONG_LONG | rb_num2ull (VALUE num) |
Converts an instance of rb_cNumeric into C's unsigned long long . More... | |
static VALUE | rb_ll2num_inline (LONG_LONG n) |
Converts a C's long long into an instance of rb_cInteger. More... | |
static VALUE | rb_ull2num_inline (unsigned LONG_LONG n) |
Converts a C's unsigned long long into an instance of rb_cInteger. More... | |
static LONG_LONG | rb_num2ll_inline (VALUE x) |
Converts an instance of rb_cNumeric into C's long long . More... | |
static unsigned LONG_LONG | rb_num2ull_inline (VALUE x) |
Converts an instance of rb_cNumeric into C's unsigned long long . More... | |
Arithmetic conversion between C's long long
and Ruby's.
RBIMPL
or rbimpl
are implementation details. Don't take them as canon. They could rapidly appear then vanish. The name (path) of this header file is also an implementation detail. Do not expect it to persist at the place it is now. Developers are free to move it anywhere anytime at will. __VA_ARGS__
is always available. We assume C99 for ruby itself but we don't assume languages of extension libraries. They could be written in C++98. 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_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.
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 . |
long long
. Referenced by 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 . |
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 . |
unsigned long long
. Referenced by 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 . |
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_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.