Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Arithmetic conversion between C's int
and Ruby's.
More...
#include "ruby/internal/config.h"
#include "ruby/internal/arithmetic/fixnum.h"
#include "ruby/internal/arithmetic/intptr_t.h"
#include "ruby/internal/arithmetic/long.h"
#include "ruby/internal/attr/artificial.h"
#include "ruby/internal/attr/const.h"
#include "ruby/internal/attr/constexpr.h"
#include "ruby/internal/compiler_is.h"
#include "ruby/internal/dllexport.h"
#include "ruby/internal/special_consts.h"
#include "ruby/internal/value.h"
#include "ruby/internal/warning_push.h"
#include "ruby/assert.h"
Go to the source code of this file.
Macros | |
#define | RB_INT2NUM rb_int2num_inline |
#define | RB_NUM2INT rb_num2int_inline |
#define | RB_UINT2NUM rb_uint2num_inline |
#define | FIX2INT RB_FIX2INT |
#define | FIX2UINT RB_FIX2UINT |
#define | INT2NUM RB_INT2NUM |
#define | NUM2INT RB_NUM2INT |
#define | NUM2UINT RB_NUM2UINT |
#define | UINT2NUM RB_UINT2NUM |
Functions | |
long | rb_num2int (VALUE) |
long | rb_fix2int (VALUE) |
unsigned long | rb_num2uint (VALUE) |
unsigned long | rb_fix2uint (VALUE) |
Arithmetic conversion between C's int
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 int.h.
#define INT2NUM RB_INT2NUM |
#define NUM2INT RB_NUM2INT |
#define UINT2NUM RB_UINT2NUM |
Definition at line 3060 of file numeric.c.
References RB_FIX2ULONG.
Definition at line 3042 of file numeric.c.
References rb_num2long().
Definition at line 3054 of file numeric.c.
References rb_num2ulong().