Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Public APIs related to rb_cEnumerator. More...
#include "ruby/internal/dllexport.h"
#include "ruby/internal/intern/eval.h"
#include "ruby/internal/iterator.h"
#include "ruby/internal/symbol.h"
#include "ruby/internal/value.h"
Go to the source code of this file.
Data Structures | |
struct | rb_arithmetic_sequence_components_t |
Macros | |
#define | rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn)) |
#define | rb_enumeratorize_with_size_kw(obj, id, argc, argv, size_fn, kw_splat) rb_enumeratorize_with_size_kw(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn), kw_splat) |
#define | SIZED_ENUMERATOR(obj, argc, argv, size_fn) |
#define | SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) |
#define | RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) |
#define | RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat) |
#define | RETURN_ENUMERATOR(obj, argc, argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0) |
#define | RETURN_ENUMERATOR_KW(obj, argc, argv, kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat) |
Typedefs | |
typedef VALUE | rb_enumerator_size_func(VALUE, VALUE, VALUE) |
Functions | |
VALUE | rb_enumeratorize (VALUE, VALUE, int, const VALUE *) |
VALUE | rb_enumeratorize_with_size (VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *) |
VALUE | rb_enumeratorize_with_size_kw (VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int) |
int | rb_arithmetic_sequence_extract (VALUE, rb_arithmetic_sequence_components_t *) |
VALUE | rb_arithmetic_sequence_beg_len_step (VALUE, long *begp, long *lenp, long *stepp, long len, int err) |
Public APIs related to rb_cEnumerator.
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 enumerator.h.
#define rb_enumeratorize_with_size | ( | obj, | |
id, | |||
argc, | |||
argv, | |||
size_fn | |||
) | rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn)) |
Definition at line 50 of file enumerator.h.
#define rb_enumeratorize_with_size_kw | ( | obj, | |
id, | |||
argc, | |||
argv, | |||
size_fn, | |||
kw_splat | |||
) | rb_enumeratorize_with_size_kw(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn), kw_splat) |
Definition at line 52 of file enumerator.h.
#define RETURN_ENUMERATOR | ( | obj, | |
argc, | |||
argv | |||
) | RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0) |
Definition at line 74 of file enumerator.h.
#define RETURN_ENUMERATOR_KW | ( | obj, | |
argc, | |||
argv, | |||
kw_splat | |||
) | RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat) |
Definition at line 77 of file enumerator.h.
Definition at line 64 of file enumerator.h.
Definition at line 69 of file enumerator.h.
Definition at line 56 of file enumerator.h.
Definition at line 60 of file enumerator.h.
Definition at line 31 of file enumerator.h.
VALUE rb_arithmetic_sequence_beg_len_step | ( | VALUE | obj, |
long * | begp, | ||
long * | lenp, | ||
long * | stepp, | ||
long | len, | ||
int | err | ||
) |
Definition at line 3411 of file enumerator.c.
References rb_arithmetic_sequence_components_t::begin, rb_arithmetic_sequence_components_t::end, err, rb_arithmetic_sequence_components_t::exclude_end, len, NIL_P, NULL, NUM2LONG, PRIsVALUE, Qfalse, Qnil, Qtrue, rb_arithmetic_sequence_extract(), rb_eRangeError, rb_raise(), rb_range_component_beg_len(), RUBY_ASSERT, and rb_arithmetic_sequence_components_t::step.
Referenced by rb_ary_aref1().
int rb_arithmetic_sequence_extract | ( | VALUE | obj, |
rb_arithmetic_sequence_components_t * | component | ||
) |
Definition at line 3393 of file enumerator.c.
References rb_arithmetic_sequence_components_t::begin, rb_arithmetic_sequence_components_t::end, rb_arithmetic_sequence_components_t::exclude_end, INT2FIX, rb_cArithSeq, rb_obj_is_kind_of(), rb_range_values(), and rb_arithmetic_sequence_components_t::step.
Referenced by rb_arithmetic_sequence_beg_len_step().
Definition at line 511 of file enumerator.c.
References argc, argv, enumerator::meth, enumerator::obj, and rb_enumeratorize_with_size.
VALUE rb_enumeratorize_with_size | ( | VALUE | obj, |
VALUE | meth, | ||
int | argc, | ||
const VALUE * | argv, | ||
rb_enumerator_size_func * | size_fn | ||
) |
Definition at line 520 of file enumerator.c.
References argc, argv, enumerator::meth, enumerator::obj, Qnil, rb_cEnumerator, rb_keyword_given_p(), rb_obj_is_kind_of(), RTEST, and enumerator::size_fn.
VALUE rb_enumeratorize_with_size_kw | ( | VALUE | obj, |
VALUE | meth, | ||
int | argc, | ||
const VALUE * | argv, | ||
rb_enumerator_size_func * | size_fn, | ||
int | kw_splat | ||
) |
Definition at line 532 of file enumerator.c.
References argc, argv, enumerator::kw_splat, enumerator::meth, enumerator::obj, Qnil, rb_cEnumerator, rb_obj_is_kind_of(), RTEST, and enumerator::size_fn.