|
Ruby 4.1.0dev (2026-10-09 revision 334b4ffa7fa75c5e347799a7609c252abe68df30)
|
Arithmetic conversion between rb_len_t and Ruby's. More...
#include "ruby/internal/config.h"#include "ruby/internal/arithmetic/long.h"#include "ruby/internal/assume.h"#include "ruby/internal/cast.h"#include "ruby/internal/value.h"

Go to the source code of this file.
Macros | |
| #define | LEN2NUM RB_LEN2NUM |
| Old name of RB_LEN2NUM. | |
| #define | NUM2LEN RB_NUM2LEN |
| Old name of RB_NUM2LEN. | |
| #define | ULEN2NUM RB_ULEN2NUM |
| Old name of RB_ULEN2NUM. | |
| #define | rb_len2int rb_len2int_inline |
| Just another name of rb_len2int_inline. | |
| #define | RB_LEN2NUM RB_LONG2NUM |
| Converts a rb_len_t into an instance of rb_cInteger. | |
| #define | RB_NUM2LEN RB_NUM2LONG |
| Converts an instance of rb_cNumeric into rb_len_t. | |
| #define | RB_ULEN2NUM RB_ULONG2NUM |
| Converts a rb_ulen_t into an instance of rb_cInteger. | |
Functions | |
| static int | rb_len2int_inline (rb_len_t n) |
Checks if int can hold the given integer. | |
Arithmetic conversion between rb_len_t 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 len_t.h.
| #define rb_len2int rb_len2int_inline |
Just another name of rb_len2int_inline.
| #define RB_LEN2NUM RB_LONG2NUM |
Converts a rb_len_t into an instance of rb_cInteger.
| #define RB_NUM2LEN RB_NUM2LONG |
Converts an instance of rb_cNumeric into rb_len_t.
| #define RB_ULEN2NUM RB_ULONG2NUM |
Converts a rb_ulen_t into an instance of rb_cInteger.