Ruby
1.9.3p551(2014-11-13revision48407)
|
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 |
Variables | |
VALUE | rb_cEnumerator |
static ID | id_rewind |
static ID | id_each |
static VALUE | sym_each |
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 |
#define enumerator_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 146 of file enumerator.c.
#define generator_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 966 of file enumerator.c.
#define yielder_free RUBY_TYPED_DEFAULT_FREE |
Definition at line 861 of file enumerator.c.
Definition at line 594 of file enumerator.c.
References args, Qnil, RARRAY_LEN, RARRAY_PTR(), rb_ary_dup(), T_ARRAY, and TYPE.
Referenced by enumerator_next(), and enumerator_peek().
Definition at line 216 of file enumerator.c.
References enumerator_data_type, enumerator::obj, ptr, Qundef, and TypedData_Make_Struct.
Referenced by Init_Enumerator(), and rb_enumeratorize().
|
static |
Definition at line 341 of file enumerator.c.
References argc, enumerator::args, argv, 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().
Definition at line 364 of file enumerator.c.
References enumerator_block_call(), obj, and rb_block_given_p().
Referenced by Init_Enumerator().
Definition at line 420 of file enumerator.c.
References enumerator_with_index(), and NULL.
Referenced by Init_Enumerator().
Definition at line 745 of file enumerator.c.
References e, enumerator_ptr(), enumerator::feedvalue, Qnil, Qundef, rb_eTypeError, rb_raise(), and v.
Referenced by Init_Enumerator().
|
static |
Definition at line 228 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(), enumerator::stop_exc, and TypedData_Get_Struct.
Referenced by enumerator_initialize(), and rb_enumeratorize().
Definition at line 308 of file enumerator.c.
References enumerator::args, enumerator_data_type, enumerator_ptr(), enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::meth, enumerator::obj, obj, Qundef, rb_eArgError, rb_eTypeError, rb_raise(), and TypedData_Get_Struct.
Referenced by Init_Enumerator().
Definition at line 285 of file enumerator.c.
References argc, enumerator_init(), generator_allocate(), generator_init(), enumerator::meth, rb_block_given_p(), rb_block_proc(), rb_cGenerator, rb_eArgError, rb_raise(), and sym_each.
Referenced by Init_Enumerator().
Definition at line 846 of file enumerator.c.
References inspect_enumerator(), and rb_exec_recursive().
Referenced by Init_Enumerator().
Definition at line 134 of file enumerator.c.
References enumerator::args, enumerator::dst, enumerator::feedvalue, enumerator::fib, enumerator::lookahead, enumerator::obj, p, ptr, rb_gc_mark(), and enumerator::stop_exc.
Definition at line 149 of file enumerator.c.
Definition at line 636 of file enumerator.c.
References ary2sv(), and enumerator_next_values().
Referenced by Init_Enumerator().
Definition at line 579 of file enumerator.c.
References e, enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.
Referenced by enumerator_next(), and Init_Enumerator().
Definition at line 710 of file enumerator.c.
References ary2sv(), and enumerator_peek_values().
Referenced by Init_Enumerator().
Definition at line 643 of file enumerator.c.
References e, enumerator_ptr(), get_next_values(), enumerator::lookahead, and Qundef.
Referenced by enumerator_peek(), and enumerator_peek_values_m().
Definition at line 682 of file enumerator.c.
References enumerator_peek_values(), and rb_ary_dup().
Referenced by Init_Enumerator().
|
static |
Definition at line 164 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_feed(), enumerator_init_copy(), enumerator_next_values(), enumerator_peek_values(), enumerator_rewind(), next_i(), and next_ii().
Definition at line 767 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 Init_Enumerator().
Definition at line 396 of file enumerator.c.
References enumerator_block_call(), enumerator_with_index_i(), INT2FIX, NEW_MEMO, NIL_P, rb_scan_args(), rb_to_int(), and RETURN_ENUMERATOR.
Referenced by enumerator_each_with_index(), and Init_Enumerator().
Definition at line 371 of file enumerator.c.
References idx, rb_ary_new4(), rb_int_succ(), rb_yield_values(), RNode::u1, and RNode::value.
Referenced by enumerator_with_index().
Definition at line 462 of file enumerator.c.
References enumerator_block_call(), enumerator_with_object_i(), and RETURN_ENUMERATOR.
Referenced by Init_Enumerator().
Definition at line 426 of file enumerator.c.
References rb_ary_new4(), and rb_yield_values().
Referenced by enumerator_with_object().
Definition at line 997 of file enumerator.c.
References generator_data_type, obj, generator::proc, ptr, Qundef, and TypedData_Make_Struct.
Referenced by enumerator_initialize(), and Init_Enumerator().
Definition at line 1071 of file enumerator.c.
References generator_ptr(), generator::proc, ptr, rb_ary_new3(), rb_proc_call(), and yielder_new().
Referenced by Init_Enumerator().
Definition at line 1009 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().
Definition at line 1052 of file enumerator.c.
References generator_data_type, generator_ptr(), obj, generator::proc, rb_eArgError, rb_raise(), and TypedData_Get_Struct.
Referenced by Init_Enumerator().
Definition at line 1026 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 Init_Enumerator().
Definition at line 960 of file enumerator.c.
References p, generator::proc, ptr, and rb_gc_mark().
Definition at line 969 of file enumerator.c.
Definition at line 984 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 |
Definition at line 507 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().
Definition at line 1134 of file enumerator.c.
References 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_with_index(), enumerator_with_object(), generator_allocate(), generator_each(), generator_init_copy(), generator_initialize(), ID2SYM, id_each, id_rewind, obj_to_enum(), rb_cEnumerator, rb_cGenerator, rb_cObject, rb_cYielder, rb_define_alloc_func(), rb_define_class(), rb_define_class_under(), rb_define_method(), rb_eIndexError, rb_eStopIteration, rb_include_module(), rb_intern, rb_mEnumerable, rb_mKernel, rb_provide(), stop_result(), sym_each, yielder_allocate(), yielder_initialize(), yielder_yield(), and yielder_yield_push().
Definition at line 782 of file enumerator.c.
References arg, argc, enumerator::args, argv, e, enumerator_data_type, enumerator::meth, enumerator::obj, OBJ_TAINT, OBJ_TAINTED, OBJ_UNTRUST, OBJ_UNTRUSTED, Qundef, RARRAY_LEN, RARRAY_PTR(), rb_id2name(), rb_inspect(), rb_obj_classname(), rb_sprintf(), rb_str_buf_cat2(), rb_str_concat(), str, TRUE, and TypedData_Get_Struct.
Referenced by enumerator_inspect().
Definition at line 485 of file enumerator.c.
References e, enumerator_ptr(), id_each, next_ii(), Qnil, rb_block_call, rb_eStopIteration, rb_exc_new2(), rb_fiber_yield(), rb_intern, rb_ivar_set(), result, and enumerator::stop_exc.
Referenced by next_init().
Definition at line 471 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 |
Definition at line 498 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().
Definition at line 204 of file enumerator.c.
References argc, enumerator::meth, rb_enumeratorize(), and sym_each.
Referenced by Init_Enumerator().
Definition at line 335 of file enumerator.c.
References enumerator_allocate(), enumerator_init(), and rb_cEnumerator.
Referenced by obj_to_enum().
Definition at line 1128 of file enumerator.c.
References rb_attr_get(), and rb_intern.
Referenced by Init_Enumerator().
Definition at line 892 of file enumerator.c.
References obj, yielder::proc, ptr, Qundef, TypedData_Make_Struct, and yielder_data_type.
Referenced by Init_Enumerator(), and yielder_new().
Definition at line 904 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().
Definition at line 921 of file enumerator.c.
References rb_block_proc(), rb_need_block(), and yielder_init().
Referenced by Init_Enumerator().
Definition at line 855 of file enumerator.c.
References p, yielder::proc, ptr, and rb_gc_mark().
Definition at line 864 of file enumerator.c.
Definition at line 951 of file enumerator.c.
References rb_cYielder, rb_proc_new(), yielder_allocate(), yielder_init(), and yielder_yield_i().
Referenced by generator_each().
Definition at line 879 of file enumerator.c.
References yielder::proc, ptr, Qundef, rb_eArgError, rb_raise(), TypedData_Get_Struct, and yielder_data_type.
Referenced by yielder_yield().
Definition at line 930 of file enumerator.c.
References yielder::proc, ptr, rb_proc_call(), and yielder_ptr().
Referenced by Init_Enumerator(), and yielder_yield_push().
Definition at line 945 of file enumerator.c.
References rb_yield_values2().
Referenced by yielder_new().
Definition at line 938 of file enumerator.c.
References obj, and yielder_yield().
Referenced by Init_Enumerator().
|
static |
Definition at line 154 of file enumerator.c.
Referenced by enumerator_allocate(), enumerator_init(), enumerator_init_copy(), enumerator_ptr(), and inspect_enumerator().
|
static |
Definition at line 974 of file enumerator.c.
Referenced by generator_allocate(), generator_init(), generator_init_copy(), and generator_ptr().
|
static |
Definition at line 101 of file enumerator.c.
Referenced by Init_Enumerator(), and next_i().
|
static |
Definition at line 101 of file enumerator.c.
Referenced by enumerator_rewind(), and Init_Enumerator().
VALUE rb_cEnumerator |
Definition at line 100 of file enumerator.c.
Referenced by enum_chunk(), enum_slice_before(), Init_Enumerator(), and rb_enumeratorize().
|
static |
Definition at line 117 of file enumerator.c.
Referenced by enumerator_initialize(), and Init_Enumerator().
|
static |
Definition at line 117 of file enumerator.c.
Referenced by Init_Enumerator(), and yielder_new().
VALUE rb_eStopIteration |
Definition at line 104 of file enumerator.c.
Referenced by Init_Enumerator(), next_i(), rb_f_loop(), and zip_i().
|
static |
Definition at line 102 of file enumerator.c.
Referenced by enumerator_initialize(), Init_Enumerator(), and obj_to_enum().
|
static |
Definition at line 869 of file enumerator.c.
Referenced by yielder_allocate(), yielder_init(), and yielder_ptr().