Ruby 2.0.0p353(2013-11-22revision43784)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Macros | Functions | Variables
enumerator.c File Reference
`#include "ruby/ruby.h"`
`#include "node.h"`
`#include "internal.h"`
Include dependency graph for enumerator.c:

Go to the source code of this file.

## Data Structures
struct | enumerator
struct | generator
struct | yielder

## Macros
#define | enumerator_free RUBY_TYPED_DEFAULT_FREE
#define | yielder_free RUBY_TYPED_DEFAULT_FREE
#define | generator_free RUBY_TYPED_DEFAULT_FREE

## Functions
static VALUE | generator_allocate (VALUE klass)
static VALUE | generator_init (VALUE obj, VALUE proc)
static void | enumerator_mark (void *p)
static size_t | enumerator_memsize (const void *p)
static struct enumerator * | enumerator_ptr (VALUE obj)
static VALUE | obj_to_enum (int argc, VALUE *argv, VALUE obj)
static VALUE | enumerator_allocate (VALUE klass)
static VALUE | enumerator_init (VALUE enum_obj, VALUE obj, VALUE meth, int argc, VALUE *argv, VALUE(*size_fn)(ANYARGS), VALUE size)
static VALUE | enumerator_initialize (int argc, VALUE *argv, VALUE obj)
static VALUE | enumerator_init_copy (VALUE obj, VALUE orig)
VALUE | rb_enumeratorize (VALUE obj, VALUE meth, int argc, VALUE *argv)
static VALUE | lazy_to_enum_i (VALUE self, VALUE meth, int argc, VALUE *argv, VALUE(*size_fn)(ANYARGS))
VALUE | rb_enumeratorize_with_size (VALUE obj, VALUE meth, int argc, VALUE *argv, VALUE(*size_fn)(ANYARGS))
static VALUE | enumerator_block_call (VALUE obj, rb_block_call_func *func, VALUE arg)
static VALUE | enumerator_each (int argc, VALUE *argv, VALUE obj)
static VALUE | enumerator_with_index_i (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | enumerator_size (VALUE obj)
static VALUE | enumerator_with_index (int argc, VALUE *argv, VALUE obj)
static VALUE | enumerator_each_with_index (VALUE obj)
static VALUE | enumerator_with_object_i (VALUE val, VALUE memo, int argc, VALUE *argv)
static VALUE | enumerator_with_object (VALUE obj, VALUE memo)
static VALUE | next_ii (VALUE i, VALUE obj, int argc, VALUE *argv)
static VALUE | next_i (VALUE curr, VALUE obj)
static void | next_init (VALUE obj, struct enumerator *e)
static VALUE | get_next_values (VALUE obj, struct enumerator *e)
static VALUE | enumerator_next_values (VALUE obj)
static VALUE | ary2sv (VALUE args, int dup)
static VALUE | enumerator_next (VALUE obj)
static VALUE | enumerator_peek_values (VALUE obj)
static VALUE | enumerator_peek_values_m (VALUE obj)
static VALUE | enumerator_peek (VALUE obj)
static VALUE | enumerator_feed (VALUE obj, VALUE v)
static VALUE | enumerator_rewind (VALUE obj)
static VALUE | inspect_enumerator (VALUE obj, VALUE dummy, int recur)
static VALUE | enumerator_inspect (VALUE obj)
static void | yielder_mark (void *p)
static size_t | yielder_memsize (const void *p)
static struct yielder * | yielder_ptr (VALUE obj)
static VALUE | yielder_allocate (VALUE klass)
static VALUE | yielder_init (VALUE obj, VALUE proc)
static VALUE | yielder_initialize (VALUE obj)
static VALUE | yielder_yield (VALUE obj, VALUE args)
static VALUE | yielder_yield_push (VALUE obj, VALUE args)
static VALUE | yielder_yield_i (VALUE obj, VALUE memo, int argc, VALUE *argv)
static VALUE | yielder_new (void)
static void | generator_mark (void *p)
static size_t | generator_memsize (const void *p)
static struct generator * | generator_ptr (VALUE obj)
static VALUE | generator_initialize (int argc, VALUE *argv, VALUE obj)
static VALUE | generator_init_copy (VALUE obj, VALUE orig)
static VALUE | generator_each (int argc, VALUE *argv, VALUE obj)
static VALUE | enum_size (VALUE self)
static VALUE | lazy_size (VALUE self)
static VALUE | lazy_receiver_size (VALUE generator, VALUE args, VALUE lazy)
static VALUE | lazy_init_iterator (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_init_block_i (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_initialize (int argc, VALUE *argv, VALUE self)
static VALUE | lazy_set_method (VALUE lazy, VALUE args, VALUE(*size_fn)(ANYARGS))
static VALUE | enumerable_lazy (VALUE obj)
static VALUE | lazy_to_enum (int argc, VALUE *argv, VALUE self)
static VALUE | lazy_map_func (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_map (VALUE obj)
static VALUE | lazy_flat_map_i (VALUE i, VALUE yielder, int argc, VALUE *argv)
static VALUE | lazy_flat_map_each (VALUE obj, VALUE yielder)
static VALUE | lazy_flat_map_to_ary (VALUE obj, VALUE yielder)
static VALUE | lazy_flat_map_func (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_flat_map (VALUE obj)
static VALUE | lazy_select_func (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_select (VALUE obj)
static VALUE | lazy_reject_func (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_reject (VALUE obj)
static VALUE | lazy_grep_func (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_grep_iter (VALUE val, VALUE m, int argc, VALUE *argv)
static VALUE | lazy_grep (VALUE obj, VALUE pattern)
static VALUE | call_next (VALUE obj)
static VALUE | next_stopped (VALUE obj)
static VALUE | lazy_zip_arrays_func (VALUE val, VALUE arrays, int argc, VALUE *argv)
static VALUE | lazy_zip_func (VALUE val, VALUE zip_args, int argc, VALUE *argv)
static VALUE | lazy_zip (int argc, VALUE *argv, VALUE obj)
static VALUE | lazy_take_func (VALUE val, VALUE args, int argc, VALUE *argv)
static VALUE | lazy_take_size (VALUE generator, VALUE args, VALUE lazy)
static VALUE | lazy_take (VALUE obj, VALUE n)
static VALUE | lazy_take_while_func (VALUE val, VALUE args, int argc, VALUE *argv)
static VALUE | lazy_take_while (VALUE obj)
static VALUE | lazy_drop_size (VALUE generator, VALUE args, VALUE lazy)
static VALUE | lazy_drop_func (VALUE val, VALUE args, int argc, VALUE *argv)
static VALUE | lazy_drop (VALUE obj, VALUE n)
static VALUE | lazy_drop_while_func (VALUE val, VALUE args, int argc, VALUE *argv)
static VALUE | lazy_drop_while (VALUE obj)
static VALUE | lazy_super (int argc, VALUE *argv, VALUE lazy)
static VALUE | lazy_lazy (VALUE obj)
static VALUE | stop_result (VALUE self)
void | InitVM_Enumerator (void)
void | Init_Enumerator (void)

## Variables
VALUE | rb_cEnumerator
VALUE | rb_cLazy
static ID | id_rewind
static ID | id_each
static ID | id_new
static ID | id_initialize
static ID | id_yield
static ID | id_call
static ID | id_size
static ID | id_to_enum
static ID | id_eqq
static ID | id_next
static ID | id_result
static ID | id_lazy
static ID | id_receiver
static ID | id_arguments
static ID | id_memo
static ID | id_method
static ID | id_force
static VALUE | sym_each
static VALUE | sym_cycle
VALUE | rb_eStopIteration
static VALUE | rb_cGenerator
static VALUE | rb_cYielder
static const rb_data_type_t | enumerator_data_type
static const rb_data_type_t | yielder_data_type
static const rb_data_type_t | generator_data_type

## Macro Definition Documentation

#define enumerator_free RUBY_TYPED_DEFAULT_FREE

Definition at line 156 of file enumerator.c.

#define generator_free RUBY_TYPED_DEFAULT_FREE

Definition at line 1103 of file enumerator.c.

#define yielder_free RUBY_TYPED_DEFAULT_FREE

Definition at line 998 of file enumerator.c.

## Function Documentation

static VALUE ary2sv | ( | VALUE | args,
|  | int | dup
| ) |  |
| static

Definition at line 686 of file enumerator.c.

References args, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_ary_dup(), RB_TYPE_P, and T_ARRAY.

Referenced by enumerator_next(), and enumerator_peek().

static VALUE call_next | ( | VALUE | obj | ) |
| static

Definition at line 1616 of file enumerator.c.

References id_next, and rb_funcall().

Referenced by lazy_zip_func().

static VALUE enum_size | ( | VALUE | self | ) |
| static

Definition at line 1226 of file enumerator.c.

References id_size, Qnil, Qundef, r, and rb_check_funcall().

Referenced by enumerable_lazy(), and lazy_size().

static VALUE enumerable_lazy | ( | VALUE | obj | ) |
| static

Definition at line 1376 of file enumerator.c.

References enum_size(), id_method, lazy_to_enum_i(), Qfalse, rb_ivar_set(), result, and sym_each.

Referenced by InitVM_Enumerator(), and lazy_super().

static VALUE enumerator_allocate | ( | VALUE | klass | ) |
| static

Definition at line 257 of file enumerator.c.

References enumerator_data_type, enumerator::obj, ptr, Qundef, and TypedData_Make_Struct.

Referenced by InitVM_Enumerator(), lazy_to_enum_i(), and rb_enumeratorize_with_size().

static VALUE enumerator_block_call | ( | VALUE | obj,
|  | rb_block_call_func * | func,
|  | VALUE | arg
| ) |  |
| static

Definition at line 419 of file enumerator.c.

References enumerator::args, e, enumerator_ptr(), enumerator::meth, enumerator::obj, RARRAY_LENINT, RARRAY_PTR(), and rb_block_call().

Referenced by enumerator_each(), enumerator_with_index(), and enumerator_with_object().

static VALUE enumerator_each | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | obj
| ) |  |
| static

Definition at line 442 of file enumerator.c.

References enumerator::args, args, e, enumerator_block_call(), enumerator_ptr(), obj, rb_ary_cat(), rb_ary_dup(), rb_ary_new4(), rb_block_given_p(), and rb_obj_dup().

Referenced by InitVM_Enumerator().

static VALUE enumerator_each_with_index | ( | VALUE | obj | ) |
| static

Definition at line 512 of file enumerator.c.

References enumerator_with_index(), and NULL.

Referenced by InitVM_Enumerator().

static VALUE enumerator_feed | ( | VALUE | obj,
|  | VALUE | v
| ) |  |
| static

Definition at line 837 of file enumerator.c.

References e, enumerator_ptr(), enumerator::feedvalue, Qnil, Qundef, rb_eTypeError, rb_raise(), and v.

Referenced by InitVM_Enumerator().

static VALUE enumerator_init | ( | VALUE | enum_obj,
|  | VALUE | obj,
|  | VALUE | meth,
|  | int | argc,
|  | VALUE * | argv,
|  | VALUE(*)(ANYARGS) | size_fn,
|  | VALUE | size
| ) |  |
| static

Definition at line 269 of file enumerator.c.

References enumerator::args, enumerator::dst, enumerator_data_type, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::meth, enumerator::obj, obj, ptr, Qfalse, Qnil, Qundef, rb_ary_new4(), rb_eArgError, rb_raise(), rb_to_id(), size, enumerator::size, enumerator::size_fn, enumerator::stop_exc, and TypedData_Get_Struct.

Referenced by enumerator_initialize(), lazy_initialize(), lazy_to_enum_i(), and rb_enumeratorize_with_size().

static VALUE enumerator_init_copy | ( | VALUE | obj,
|  | VALUE | orig
| ) |  |
| static

Definition at line 365 of file enumerator.c.

References enumerator::args, enumerator_data_type, enumerator_ptr(), enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::meth, enumerator::obj, obj, OBJ_INIT_COPY, Qundef, rb_eArgError, rb_eTypeError, rb_raise(), enumerator::size, enumerator::size_fn, and TypedData_Get_Struct.

Referenced by InitVM_Enumerator().

static VALUE enumerator_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | obj
| ) |  |
| static

Definition at line 332 of file enumerator.c.

References argc, enumerator_init(), generator_allocate(), generator_init(), INFINITY, NIL_P(), Qnil, rb_block_given_p(), rb_block_proc(), rb_cGenerator, rb_check_arity, rb_obj_is_proc(), rb_to_int(), RB_TYPE_P, rb_warn(), RFLOAT_VALUE, size, sym_each, T_FLOAT, and UNLIMITED_ARGUMENTS.

Referenced by InitVM_Enumerator().

static VALUE enumerator_inspect | ( | VALUE | obj | ) |
| static

Definition at line 955 of file enumerator.c.

References inspect_enumerator(), and rb_exec_recursive().

Referenced by InitVM_Enumerator().

static void enumerator_mark | ( | void * | p | ) |
| static

Definition at line 143 of file enumerator.c.

References enumerator::args, enumerator::dst, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::obj, p, ptr, rb_gc_mark(), enumerator::size, and enumerator::stop_exc.

static size_t enumerator_memsize | ( | const void * | p | ) |
| static

Definition at line 159 of file enumerator.c.

static VALUE enumerator_next | ( | VALUE | obj | ) |
| static

Definition at line 728 of file enumerator.c.

References ary2sv(), and enumerator_next_values().

Referenced by InitVM_Enumerator().

static VALUE enumerator_next_values | ( | VALUE | obj | ) |
| static

Definition at line 671 of file enumerator.c.

References e, enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.

Referenced by enumerator_next(), and InitVM_Enumerator().

static VALUE enumerator_peek | ( | VALUE | obj | ) |
| static

Definition at line 802 of file enumerator.c.

References ary2sv(), and enumerator_peek_values().

Referenced by InitVM_Enumerator().

static VALUE enumerator_peek_values | ( | VALUE | obj | ) |
| static

Definition at line 735 of file enumerator.c.

References e, enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.

Referenced by enumerator_peek(), and enumerator_peek_values_m().

static VALUE enumerator_peek_values_m | ( | VALUE | obj | ) |
| static

Definition at line 774 of file enumerator.c.

References enumerator_peek_values(), and rb_ary_dup().

Referenced by InitVM_Enumerator().

static struct enumerator* enumerator_ptr | ( | VALUE | obj | ) |
| static

Definition at line 174 of file enumerator.c.

References enumerator_data_type, enumerator::obj, ptr, Qundef, rb_eArgError, rb_raise(), and TypedData_Get_Struct.

Referenced by enumerator_block_call(), enumerator_each(), enumerator_feed(), enumerator_init_copy(), enumerator_next_values(), enumerator_peek_values(), enumerator_rewind(), enumerator_size(), lazy_set_method(), lazy_to_enum(), next_i(), next_ii(), and obj_to_enum().

static VALUE enumerator_rewind | ( | VALUE | obj | ) |
| static

Definition at line 859 of file enumerator.c.

References enumerator::dst, e, enumerator_ptr(), enumerator::feedvalue, enumerator::fib, id_rewind, enumerator::lookahead, enumerator::obj, obj, Qfalse, Qnil, Qundef, rb_check_funcall(), and enumerator::stop_exc.

Referenced by InitVM_Enumerator().

static VALUE enumerator_size | ( | VALUE | obj | ) |
| static

Definition at line 972 of file enumerator.c.

References enumerator::args, e, enumerator_ptr(), enumerator::obj, obj, Qnil, rb_obj_is_proc(), rb_proc_call(), rb_proc_call_with_block(), enumerator::size, and enumerator::size_fn.

Referenced by enumerator_with_index(), enumerator_with_object(), and InitVM_Enumerator().

static VALUE enumerator_with_index | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | obj
| ) |  |
| static

Definition at line 491 of file enumerator.c.

References enumerator_block_call(), enumerator_size(), enumerator_with_index_i(), NIL_P(), NUM2LONG, rb_scan_args(), and RETURN_SIZED_ENUMERATOR.

Referenced by enumerator_each_with_index(), and InitVM_Enumerator().

static VALUE enumerator_with_index_i | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 461 of file enumerator.c.

References idx, INT2FIX, rb_ary_new4(), and rb_yield_values().

Referenced by enumerator_with_index().

static VALUE enumerator_with_object | ( | VALUE | obj,
|  | VALUE | memo
| ) |  |
| static

Definition at line 554 of file enumerator.c.

References enumerator_block_call(), enumerator_size(), enumerator_with_object_i(), and RETURN_SIZED_ENUMERATOR.

Referenced by InitVM_Enumerator().

static VALUE enumerator_with_object_i | ( | VALUE | val,
|  | VALUE | memo,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 518 of file enumerator.c.

References rb_ary_new4(), and rb_yield_values().

Referenced by enumerator_with_object().

static VALUE generator_allocate | ( | VALUE | klass | ) |
| static

Definition at line 1134 of file enumerator.c.

References generator_data_type, obj, generator::proc, ptr, Qundef, and TypedData_Make_Struct.

Referenced by enumerator_initialize(), InitVM_Enumerator(), and lazy_initialize().

static VALUE generator_each | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | obj
| ) |  |
| static

Definition at line 1211 of file enumerator.c.

References args, generator_ptr(), generator::proc, ptr, rb_ary_cat(), rb_ary_new2(), rb_ary_push(), rb_proc_call(), and yielder_new().

Referenced by InitVM_Enumerator().

static VALUE generator_init | ( | VALUE | obj,
|  | VALUE | proc
| ) |  |
| static

Definition at line 1146 of file enumerator.c.

References generator_data_type, obj, generator::proc, proc, ptr, rb_eArgError, rb_raise(), and TypedData_Get_Struct.

Referenced by enumerator_initialize(), and generator_initialize().

static VALUE generator_init_copy | ( | VALUE | obj,
|  | VALUE | orig
| ) |  |
| static

Definition at line 1190 of file enumerator.c.

References generator_data_type, generator_ptr(), obj, OBJ_INIT_COPY, generator::proc, rb_eArgError, rb_raise(), and TypedData_Get_Struct.

Referenced by InitVM_Enumerator().

static VALUE generator_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | obj
| ) |  |
| static

Definition at line 1163 of file enumerator.c.

References generator_init(), proc, rb_block_given_p(), rb_block_proc(), rb_eTypeError, rb_need_block(), rb_obj_classname(), rb_obj_is_proc(), rb_raise(), rb_scan_args(), and rb_warn().

Referenced by InitVM_Enumerator().

static void generator_mark | ( | void * | p | ) |
| static

Definition at line 1097 of file enumerator.c.

References p, generator::proc, ptr, and rb_gc_mark().

static size_t generator_memsize | ( | const void * | p | ) |
| static

Definition at line 1106 of file enumerator.c.

static struct generator* generator_ptr | ( | VALUE | obj | ) |
| static

Definition at line 1121 of file enumerator.c.

References generator_data_type, generator::proc, ptr, Qundef, rb_eArgError, rb_raise(), and TypedData_Get_Struct.

Referenced by generator_each(), and generator_init_copy().

static VALUE get_next_values | ( | VALUE | obj,
|  | struct enumerator * | e
| ) |  |
| static

Definition at line 599 of file enumerator.c.

References enumerator::dst, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, next_init(), Qnil, Qundef, rb_exc_raise(), rb_fiber_alive_p(), rb_fiber_current(), rb_fiber_resume(), and enumerator::stop_exc.

Referenced by enumerator_next_values(), and enumerator_peek_values().

void Init_Enumerator | ( | void |  | ) |

Definition at line 1987 of file enumerator.c.

References ID2SYM, id_arguments, id_call, id_each, id_eqq, id_force, id_initialize, id_lazy, id_memo, id_method, id_new, id_next, id_receiver, id_result, id_rewind, id_size, id_to_enum, id_yield, InitVM, rb_intern, sym_cycle, and sym_each.

void InitVM_Enumerator | ( | void |  | ) |

Definition at line 1915 of file enumerator.c.

References enumerable_lazy(), enumerator_allocate(), enumerator_each(), enumerator_each_with_index(), enumerator_feed(), enumerator_init_copy(), enumerator_initialize(), enumerator_inspect(), enumerator_next(), enumerator_next_values(), enumerator_peek(), enumerator_peek_values_m(), enumerator_rewind(), enumerator_size(), enumerator_with_index(), enumerator_with_object(), generator_allocate(), generator_each(), generator_init_copy(), generator_initialize(), lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_initialize(), lazy_lazy(), lazy_map(), lazy_reject(), lazy_select(), lazy_super(), lazy_take(), lazy_take_while(), lazy_to_enum(), lazy_zip(), obj_to_enum(), rb_cEnumerator, rb_cGenerator, rb_cLazy, rb_cObject, rb_cYielder, rb_define_alias(), rb_define_alloc_func(), rb_define_class(), rb_define_class_under(), rb_define_method(), rb_eIndexError, rb_eStopIteration, rb_include_module(), rb_mEnumerable, rb_mKernel, rb_provide(), stop_result(), yielder_allocate(), yielder_initialize(), yielder_yield(), and yielder_yield_push().

static VALUE inspect_enumerator | ( | VALUE | obj,
|  | VALUE | dummy,
|  | int | recur
| ) |  |
| static

Definition at line 874 of file enumerator.c.

References arg, enumerator::args, Check_Type, e, enumerator_data_type, id_arguments, id_method, id_receiver, enumerator::meth, method, NIL_P(), enumerator::obj, OBJ_TAINT, OBJ_TAINTED, OBJ_UNTRUST, OBJ_UNTRUSTED, Qfalse, Qundef, RARRAY_LEN, RARRAY_PTR(), rb_attr_get(), rb_id2name(), rb_inspect(), rb_obj_classname(), rb_sprintf(), rb_str_buf_cat2(), rb_str_concat(), str, SYM2ID, T_SYMBOL, TRUE, and TypedData_Get_Struct.

Referenced by enumerator_inspect().

static VALUE lazy_drop | ( | VALUE | obj,
|  | VALUE | n
| ) |  |
| static

Definition at line 1813 of file enumerator.c.

References id_new, lazy_drop_func(), lazy_drop_size(), lazy_set_method(), len, NUM2LONG, rb_ary_new3(), rb_block_call(), rb_cLazy, rb_eArgError, and rb_raise().

Referenced by InitVM_Enumerator().

static VALUE lazy_drop_func | ( | VALUE | val,
|  | VALUE | args,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1796 of file enumerator.c.

References args, id_memo, id_yield, LONG2NUM, NIL_P(), NUM2LONG, Qnil, rb_attr_get(), rb_funcall2(), and rb_ivar_set().

Referenced by lazy_drop().

static VALUE lazy_drop_size | ( | VALUE | generator,
|  | VALUE | args,
|  | VALUE | lazy
| ) |  |
| static

Definition at line 1782 of file enumerator.c.

References FIX2LONG, FIXNUM_P, id_arguments, lazy_size(), len, LONG2FIX, LONG2NUM, NIL_P(), NUM2LONG, RARRAY_PTR(), rb_funcall(), rb_ivar_get(), and receiver.

Referenced by lazy_drop().

static VALUE lazy_drop_while | ( | VALUE | obj | ) |
| static

Definition at line 1839 of file enumerator.c.

References id_new, lazy_drop_while_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().

Referenced by InitVM_Enumerator().

static VALUE lazy_drop_while_func | ( | VALUE | val,
|  | VALUE | args,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1826 of file enumerator.c.

References id_memo, id_yield, NIL_P(), Qnil, Qtrue, rb_attr_get(), rb_funcall2(), rb_ivar_set(), rb_yield_values2(), and RTEST.

Referenced by lazy_drop_while().

static VALUE lazy_flat_map | ( | VALUE | obj | ) |
| static

Definition at line 1524 of file enumerator.c.

References id_new, lazy_flat_map_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().

Referenced by InitVM_Enumerator().

static VALUE lazy_flat_map_each | ( | VALUE | obj,
|  | VALUE | yielder
| ) |  |
| static

Definition at line 1458 of file enumerator.c.

References id_each, lazy_flat_map_i(), Qnil, and rb_block_call().

Referenced by lazy_flat_map_func().

static VALUE lazy_flat_map_func | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1481 of file enumerator.c.

References i, id_each, id_force, id_yield, lazy_flat_map_each(), lazy_flat_map_to_ary(), Qnil, RARRAY_LEN, RARRAY_PTR(), rb_funcall(), rb_respond_to(), RB_TYPE_P, rb_yield_values2(), result, and T_ARRAY.

Referenced by lazy_flat_map().

static VALUE lazy_flat_map_i | ( | VALUE | i,
|  | VALUE | yielder,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1452 of file enumerator.c.

References id_yield, and rb_funcall2().

Referenced by lazy_flat_map_each().

static VALUE lazy_flat_map_to_ary | ( | VALUE | obj,
|  | VALUE | yielder
| ) |  |
| static

Definition at line 1465 of file enumerator.c.

References ary, i, id_yield, NIL_P(), Qnil, RARRAY_LEN, RARRAY_PTR(), rb_check_array_type(), and rb_funcall().

Referenced by lazy_flat_map_func().

static VALUE lazy_grep | ( | VALUE | obj,
|  | VALUE | pattern
| ) |  |
| static

Definition at line 1606 of file enumerator.c.

References id_new, lazy_grep_func(), lazy_grep_iter(), lazy_set_method(), rb_ary_new3(), rb_block_call(), rb_block_given_p(), and rb_cLazy.

Referenced by InitVM_Enumerator().

static VALUE lazy_grep_func | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1582 of file enumerator.c.

References i, id_eqq, id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), result, and RTEST.

Referenced by lazy_grep().

static VALUE lazy_grep_iter | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1594 of file enumerator.c.

References i, id_eqq, id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), rb_yield(), result, and RTEST.

Referenced by lazy_grep().

static VALUE lazy_init_block_i | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1271 of file enumerator.c.

References id_each, lazy_init_iterator(), Qnil, and rb_block_call().

Referenced by lazy_initialize().

static VALUE lazy_init_iterator | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1245 of file enumerator.c.

References args, len, m, Qnil, Qundef, RARRAY_PTR(), rb_ary_cat(), rb_ary_push(), rb_ary_tmp_new(), RB_GC_GUARD, rb_iter_break(), rb_long2int, rb_yield_values2(), result, and val.

Referenced by lazy_init_block_i().

static VALUE lazy_initialize | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1306 of file enumerator.c.

References enumerator_init(), generator_allocate(), id_initialize, id_receiver, lazy_init_block_i(), obj, Qnil, rb_block_call(), rb_block_given_p(), rb_cGenerator, rb_check_arity, rb_eArgError, rb_ivar_set(), rb_raise(), size, and sym_each.

Referenced by InitVM_Enumerator().

static VALUE lazy_lazy | ( | VALUE | obj | ) |
| static

Definition at line 1856 of file enumerator.c.

References obj.

Referenced by InitVM_Enumerator().

static VALUE lazy_map | ( | VALUE | obj | ) |
| static

Definition at line 1440 of file enumerator.c.

References id_new, lazy_map_func(), lazy_receiver_size(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().

Referenced by InitVM_Enumerator().

static VALUE lazy_map_func | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1431 of file enumerator.c.

References id_yield, Qnil, rb_funcall(), rb_yield_values2(), and result.

Referenced by lazy_map().

static VALUE lazy_receiver_size | ( | VALUE | generator,
|  | VALUE | args,
|  | VALUE | lazy
| ) |  |
| static

Definition at line 1239 of file enumerator.c.

References lazy_size().

Referenced by lazy_map(), and lazy_zip().

static VALUE lazy_reject | ( | VALUE | obj | ) |
| static

Definition at line 1570 of file enumerator.c.

References id_new, lazy_reject_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().

Referenced by InitVM_Enumerator().

static VALUE lazy_reject_func | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1559 of file enumerator.c.

References id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), rb_yield(), and RTEST.

Referenced by lazy_reject().

static VALUE lazy_select | ( | VALUE | obj | ) |
| static

Definition at line 1547 of file enumerator.c.

References id_new, lazy_select_func(), lazy_set_method(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().

Referenced by InitVM_Enumerator().

static VALUE lazy_select_func | ( | VALUE | val,
|  | VALUE | m,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1536 of file enumerator.c.

References id_yield, Qnil, rb_enum_values_pack(), rb_funcall(), rb_yield(), and RTEST.

Referenced by lazy_select().

static VALUE lazy_set_method | ( | VALUE | lazy,
|  | VALUE | args,
|  | VALUE(*)(ANYARGS) | size_fn
| ) |  |
| static

Definition at line 1328 of file enumerator.c.

References e, enumerator_ptr(), ID2SYM, id_arguments, id_method, NIL_P(), Qfalse, rb_frame_this_func(), rb_ivar_set(), and enumerator::size_fn.

Referenced by lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), lazy_take_while(), and lazy_zip().

static VALUE lazy_size | ( | VALUE | self | ) |
| static

Definition at line 1233 of file enumerator.c.

References enum_size(), id_receiver, and rb_ivar_get().

Referenced by lazy_drop_size(), lazy_receiver_size(), and lazy_take_size().

static VALUE lazy_super | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | lazy
| ) |  |
| static

Definition at line 1850 of file enumerator.c.

References enumerable_lazy(), and rb_call_super().

Referenced by InitVM_Enumerator().

static VALUE lazy_take | ( | VALUE | obj,
|  | VALUE | n
| ) |  |
| static

Definition at line 1742 of file enumerator.c.

References id_new, INT2NUM, lazy_set_method(), lazy_take_func(), lazy_take_size(), lazy_to_enum_i(), len, NUM2LONG, rb_ary_new3(), rb_block_call(), rb_cLazy, rb_eArgError, rb_raise(), and sym_cycle.

Referenced by InitVM_Enumerator().

static VALUE lazy_take_func | ( | VALUE | val,
|  | VALUE | args,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1713 of file enumerator.c.

References args, id_memo, id_yield, LONG2NUM, NIL_P(), NUM2LONG, Qnil, Qundef, rb_attr_get(), rb_funcall2(), and rb_ivar_set().

Referenced by lazy_take().

static VALUE lazy_take_size | ( | VALUE | generator,
|  | VALUE | args,
|  | VALUE | lazy
| ) |  |
| static

Definition at line 1732 of file enumerator.c.

References FIX2LONG, FIXNUM_P, id_arguments, lazy_size(), len, LONG2NUM, NIL_P(), NUM2LONG, RARRAY_PTR(), rb_ivar_get(), and receiver.

Referenced by lazy_take().

static VALUE lazy_take_while | ( | VALUE | obj | ) |
| static

Definition at line 1771 of file enumerator.c.

References id_new, lazy_set_method(), lazy_take_while_func(), Qnil, rb_block_call(), rb_block_given_p(), rb_cLazy, rb_eArgError, and rb_raise().

Referenced by InitVM_Enumerator().

static VALUE lazy_take_while_func | ( | VALUE | val,
|  | VALUE | args,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1762 of file enumerator.c.

References id_yield, Qnil, Qundef, rb_funcall2(), rb_yield_values2(), result, and RTEST.

Referenced by lazy_take_while().

static VALUE lazy_to_enum | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | self
| ) |  |
| static

Definition at line 1415 of file enumerator.c.

References argc, enumerator_ptr(), lazy_to_enum_i(), rb_block_given_p(), rb_block_proc(), enumerator::size, and sym_each.

Referenced by InitVM_Enumerator().

static VALUE lazy_to_enum_i | ( | VALUE | self,
|  | VALUE | meth,
|  | int | argc,
|  | VALUE * | argv,
|  | VALUE(*)(ANYARGS) | size_fn
| ) |  |
| static

Definition at line 1385 of file enumerator.c.

References enumerator_allocate(), enumerator_init(), Qnil, rb_cLazy, and enumerator::size_fn.

Referenced by enumerable_lazy(), lazy_take(), lazy_to_enum(), and rb_enumeratorize_with_size().

static VALUE lazy_zip | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | obj
| ) |  |
| static

Definition at line 1680 of file enumerator.c.

References argc, ary, func, i, id_each, id_new, lazy_receiver_size(), lazy_set_method(), lazy_zip_arrays_func(), lazy_zip_func(), NIL_P(), rb_ary_new2(), rb_ary_new4(), rb_ary_push(), rb_block_call(), rb_block_given_p(), rb_call_super(), rb_check_array_type(), rb_cLazy, rb_eTypeError, rb_obj_classname(), rb_raise(), rb_respond_to(), and v.

Referenced by InitVM_Enumerator().

static VALUE lazy_zip_arrays_func | ( | VALUE | val,
|  | VALUE | arrays,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1628 of file enumerator.c.

References ary, count, i, id_memo, id_yield, LONG2NUM, NIL_P(), NUM2LONG, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_ary_entry(), rb_ary_new2(), rb_ary_push(), rb_attr_get(), rb_funcall(), and rb_ivar_set().

Referenced by lazy_zip().

static VALUE lazy_zip_func | ( | VALUE | val,
|  | VALUE | zip_args,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1648 of file enumerator.c.

References arg, argv, ary, call_next(), i, id_memo, id_to_enum, id_yield, next_stopped(), NIL_P(), Qnil, RARRAY_LEN, RARRAY_PTR(), rb_ary_new2(), rb_ary_new4(), rb_ary_push(), rb_attr_get(), rb_eStopIteration, rb_funcall(), rb_ivar_set(), rb_rescue2(), and v.

Referenced by lazy_zip().

static VALUE next_i | ( | VALUE | curr,
|  | VALUE | obj
| ) |  |
| static

Definition at line 577 of file enumerator.c.

References e, enumerator_ptr(), id_each, id_result, next_ii(), Qnil, rb_block_call(), rb_eStopIteration, rb_exc_new2(), rb_fiber_yield(), rb_ivar_set(), result, and enumerator::stop_exc.

Referenced by next_init().

static VALUE next_ii | ( | VALUE | i,
|  | VALUE | obj,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 563 of file enumerator.c.

References args, e, enumerator_ptr(), enumerator::feedvalue, Qnil, Qundef, rb_ary_new4(), and rb_fiber_yield().

Referenced by next_i().

static void next_init | ( | VALUE | obj,
|  | struct enumerator * | e
| ) |  |
| static

Definition at line 590 of file enumerator.c.

References enumerator::dst, enumerator::fib, enumerator::lookahead, next_i(), Qundef, rb_fiber_current(), and rb_fiber_new().

Referenced by get_next_values().

static VALUE next_stopped | ( | VALUE | obj | ) |
| static

Definition at line 1622 of file enumerator.c.

References Qnil.

Referenced by lazy_zip_func().

static VALUE obj_to_enum | ( | int | argc,
|  | VALUE * | argv,
|  | VALUE | obj
| ) |  |
| static

Definition at line 241 of file enumerator.c.

References argc, enumerator_ptr(), enumerator::meth, rb_block_given_p(), rb_block_proc(), rb_enumeratorize_with_size(), enumerator::size, and sym_each.

Referenced by InitVM_Enumerator().

VALUE rb_enumeratorize | ( | VALUE | obj,
|  | VALUE | meth,
|  | int | argc,
|  | VALUE * | argv
| ) |  |

Definition at line 398 of file enumerator.c.

References rb_enumeratorize_with_size().

Referenced by argf_bytes(), argf_chars(), argf_codepoints(), argf_lines(), rb_gzreader_bytes(), rb_gzreader_lines(), rb_io_bytes(), rb_io_chars(), rb_io_codepoints(), rb_io_lines(), strio_bytes(), strio_chars(), strio_codepoints(), and strio_lines().

VALUE rb_enumeratorize_with_size | ( | VALUE | obj,
|  | VALUE | meth,
|  | int | argc,
|  | VALUE * | argv,
|  | VALUE(*)(ANYARGS) | size_fn
| ) |  |

Definition at line 407 of file enumerator.c.

References enumerator_allocate(), enumerator_init(), lazy_to_enum_i(), Qnil, rb_cEnumerator, rb_cLazy, rb_obj_is_kind_of(), RTEST, and enumerator::size_fn.

Referenced by obj_to_enum(), and rb_enumeratorize().

static VALUE stop_result | ( | VALUE | self | ) |
| static

Definition at line 1909 of file enumerator.c.

References id_result, and rb_attr_get().

Referenced by InitVM_Enumerator().

static VALUE yielder_allocate | ( | VALUE | klass | ) |
| static

Definition at line 1029 of file enumerator.c.

References obj, yielder::proc, ptr, Qundef, TypedData_Make_Struct, and yielder_data_type.

Referenced by InitVM_Enumerator(), and yielder_new().

static VALUE yielder_init | ( | VALUE | obj,
|  | VALUE | proc
| ) |  |
| static

Definition at line 1041 of file enumerator.c.

References obj, yielder::proc, proc, ptr, rb_eArgError, rb_raise(), TypedData_Get_Struct, and yielder_data_type.

Referenced by yielder_initialize(), and yielder_new().

static VALUE yielder_initialize | ( | VALUE | obj | ) |
| static

Definition at line 1058 of file enumerator.c.

References rb_block_proc(), rb_need_block(), and yielder_init().

Referenced by InitVM_Enumerator().

static void yielder_mark | ( | void * | p | ) |
| static

Definition at line 992 of file enumerator.c.

References p, yielder::proc, ptr, and rb_gc_mark().

static size_t yielder_memsize | ( | const void * | p | ) |
| static

Definition at line 1001 of file enumerator.c.

static VALUE yielder_new | ( | void |  | ) |
| static

Definition at line 1088 of file enumerator.c.

References rb_cYielder, rb_proc_new(), yielder_allocate(), yielder_init(), and yielder_yield_i().

Referenced by generator_each().

static struct yielder* yielder_ptr | ( | VALUE | obj | ) |
| static

Definition at line 1016 of file enumerator.c.

References yielder::proc, ptr, Qundef, rb_eArgError, rb_raise(), TypedData_Get_Struct, and yielder_data_type.

Referenced by yielder_yield().

static VALUE yielder_yield | ( | VALUE | obj,
|  | VALUE | args
| ) |  |
| static

Definition at line 1067 of file enumerator.c.

References yielder::proc, ptr, rb_proc_call(), and yielder_ptr().

Referenced by InitVM_Enumerator(), and yielder_yield_push().

static VALUE yielder_yield_i | ( | VALUE | obj,
|  | VALUE | memo,
|  | int | argc,
|  | VALUE * | argv
| ) |  |
| static

Definition at line 1082 of file enumerator.c.

References rb_yield_values2().

Referenced by yielder_new().

static VALUE yielder_yield_push | ( | VALUE | obj,
|  | VALUE | args
| ) |  |
| static

Definition at line 1075 of file enumerator.c.

References obj, and yielder_yield().

Referenced by InitVM_Enumerator().

## Variable Documentation

const rb_data_type_t enumerator_data_type
| static

Initial value:
= {
"enumerator",
{
enumerator_mark,
enumerator_free,
enumerator_memsize,
},
}
enumerator_mark
static void enumerator_mark(void *p)
Definition: enumerator.c:143
enumerator_free
#define enumerator_free
Definition: enumerator.c:156
enumerator_memsize
static size_t enumerator_memsize(const void *p)
Definition: enumerator.c:159

Definition at line 164 of file enumerator.c.

Referenced by enumerator_allocate(), enumerator_init(), enumerator_init_copy(), enumerator_ptr(), and inspect_enumerator().

const rb_data_type_t generator_data_type
| static

Initial value:
= {
"generator",
{
generator_mark,
generator_free,
generator_memsize,
},
}
generator_mark
static void generator_mark(void *p)
Definition: enumerator.c:1097
generator_memsize
static size_t generator_memsize(const void *p)
Definition: enumerator.c:1106
generator_free
#define generator_free
Definition: enumerator.c:1103

Definition at line 1111 of file enumerator.c.

Referenced by generator_allocate(), generator_init(), generator_init_copy(), and generator_ptr().

ID id_arguments
| static

Definition at line 108 of file enumerator.c.

Referenced by Init_Enumerator(), inspect_enumerator(), lazy_drop_size(), lazy_set_method(), and lazy_take_size().

ID id_call
| static

Definition at line 107 of file enumerator.c.

Referenced by Init_Enumerator().

ID id_each
| static

Definition at line 107 of file enumerator.c.

Referenced by Init_Enumerator(), lazy_flat_map_each(), lazy_flat_map_func(), lazy_init_block_i(), lazy_zip(), and next_i().

ID id_eqq
| static

Definition at line 108 of file enumerator.c.

Referenced by Init_Enumerator(), lazy_grep_func(), and lazy_grep_iter().

ID id_force
| static

Definition at line 108 of file enumerator.c.

Referenced by Init_Enumerator(), and lazy_flat_map_func().

ID id_initialize
| static

Definition at line 107 of file enumerator.c.

Referenced by Init_Enumerator(), and lazy_initialize().

ID id_lazy
| static

Definition at line 108 of file enumerator.c.

Referenced by Init_Enumerator().

ID id_memo
| static

Definition at line 108 of file enumerator.c.

Referenced by Init_Enumerator(), lazy_drop_func(), lazy_drop_while_func(), lazy_take_func(), lazy_zip_arrays_func(), and lazy_zip_func().

ID id_method
| static

Definition at line 108 of file enumerator.c.

Referenced by enumerable_lazy(), Init_Enumerator(), inspect_enumerator(), and lazy_set_method().

ID id_new
| static

Definition at line 107 of file enumerator.c.

Referenced by Init_Enumerator(), lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), lazy_take_while(), and lazy_zip().

ID id_next
| static

Definition at line 108 of file enumerator.c.

Referenced by call_next(), and Init_Enumerator().

ID id_receiver
| static

Definition at line 108 of file enumerator.c.

Referenced by Init_Enumerator(), inspect_enumerator(), lazy_initialize(), and lazy_size().

ID id_result
| static

Definition at line 108 of file enumerator.c.

Referenced by Init_Enumerator(), next_i(), and stop_result().

ID id_rewind
| static

Definition at line 107 of file enumerator.c.

Referenced by enumerator_rewind(), and Init_Enumerator().

ID id_size
| static

Definition at line 107 of file enumerator.c.

Referenced by enum_size(), and Init_Enumerator().

ID id_to_enum
| static

Definition at line 107 of file enumerator.c.

Referenced by Init_Enumerator(), and lazy_zip_func().

ID id_yield
| static

Definition at line 107 of file enumerator.c.

Referenced by Init_Enumerator(), lazy_drop_func(), lazy_drop_while_func(), lazy_flat_map_func(), lazy_flat_map_i(), lazy_flat_map_to_ary(), lazy_grep_func(), lazy_grep_iter(), lazy_map_func(), lazy_reject_func(), lazy_select_func(), lazy_take_func(), lazy_take_while_func(), lazy_zip_arrays_func(), and lazy_zip_func().

VALUE rb_cEnumerator

Definition at line 105 of file enumerator.c.

Referenced by enum_chunk(), enum_slice_before(), InitVM_Enumerator(), and rb_enumeratorize_with_size().

VALUE rb_cGenerator
| static

Definition at line 126 of file enumerator.c.

Referenced by enumerator_initialize(), InitVM_Enumerator(), and lazy_initialize().

VALUE rb_cLazy

Definition at line 106 of file enumerator.c.

Referenced by InitVM_Enumerator(), lazy_drop(), lazy_drop_while(), lazy_flat_map(), lazy_grep(), lazy_map(), lazy_reject(), lazy_select(), lazy_take(), lazy_take_while(), lazy_to_enum_i(), lazy_zip(), and rb_enumeratorize_with_size().

VALUE rb_cYielder
| static

Definition at line 126 of file enumerator.c.

Referenced by InitVM_Enumerator(), and yielder_new().

VALUE rb_eStopIteration

Definition at line 111 of file enumerator.c.

Referenced by InitVM_Enumerator(), lazy_zip_func(), next_i(), rb_f_loop(), and zip_i().

VALUE sym_cycle
| static

Definition at line 109 of file enumerator.c.

Referenced by Init_Enumerator(), and lazy_take().

VALUE sym_each
| static

Definition at line 109 of file enumerator.c.

Referenced by enumerable_lazy(), enumerator_initialize(), Init_Enumerator(), lazy_initialize(), lazy_to_enum(), and obj_to_enum().

const rb_data_type_t yielder_data_type
| static

Initial value:
= {
"yielder",
{
yielder_mark,
yielder_free,
yielder_memsize,
},
}
yielder_mark
static void yielder_mark(void *p)
Definition: enumerator.c:992
yielder_memsize
static size_t yielder_memsize(const void *p)
Definition: enumerator.c:1001
yielder_free
#define yielder_free
Definition: enumerator.c:998

Definition at line 1006 of file enumerator.c.

Referenced by yielder_allocate(), yielder_init(), and yielder_ptr().