Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals

enum.c File Reference

#include "ruby.h"
#include "node.h"
#include "util.h"

Go to the source code of this file.

Functions

VALUE rb_each (VALUE obj)
VALUE grep_i (VALUE i, VALUE *arg)
VALUE grep_iter_i (VALUE i, VALUE *arg)
VALUE enum_grep (VALUE obj, VALUE pat)
VALUE find_i (VALUE i, VALUE *memo)
VALUE enum_find (int argc, VALUE *argv, VALUE obj)
VALUE find_all_i (VALUE i, VALUE ary)
VALUE enum_find_all (VALUE obj)
VALUE reject_i (VALUE i, VALUE ary)
VALUE enum_reject (VALUE obj)
VALUE collect_i (VALUE i, VALUE ary)
VALUE collect_all (VALUE i, VALUE ary)
VALUE enum_collect (VALUE obj)
VALUE enum_to_a (VALUE obj)
VALUE inject_i (VALUE i, VALUE *memo)
VALUE enum_inject (int argc, VALUE *argv, VALUE obj)
VALUE partition_i (VALUE i, VALUE *ary)
VALUE enum_partition (VALUE obj)
VALUE enum_sort (VALUE obj)
VALUE sort_by_i (VALUE i, VALUE ary)
int sort_by_cmp (NODE **aa, NODE **bb)
VALUE enum_sort_by (VALUE obj)
VALUE all_iter_i (VALUE i, VALUE *memo)
VALUE all_i (VALUE i, VALUE *memo)
VALUE enum_all (VALUE obj)
VALUE any_iter_i (VALUE i, VALUE *memo)
VALUE any_i (VALUE i, VALUE *memo)
VALUE enum_any (VALUE obj)
VALUE min_i (VALUE i, VALUE *memo)
VALUE min_ii (VALUE i, VALUE *memo)
VALUE enum_min (VALUE obj)
VALUE max_i (VALUE i, VALUE *memo)
VALUE max_ii (VALUE i, VALUE *memo)
VALUE enum_max (VALUE obj)
VALUE member_i (VALUE item, VALUE *memo)
VALUE enum_member (VALUE obj, VALUE val)
VALUE each_with_index_i (VALUE val, VALUE *memo)
VALUE enum_each_with_index (VALUE obj)
VALUE zip_i (VALUE val, VALUE *memo)
VALUE enum_zip (int argc, VALUE *argv, VALUE obj)
void Init_Enumerable ()

Variables

VALUE rb_mEnumerable
ID id_each
ID id_eqq
ID id_cmp


Function Documentation

VALUE all_i VALUE  i,
VALUE memo
[static]
 

Definition at line 513 of file enum.c.

References Qfalse, Qnil, rb_iter_break(), RTEST, and VALUE.

Referenced by enum_all().

VALUE all_iter_i VALUE  i,
VALUE memo
[static]
 

Definition at line 501 of file enum.c.

References Qfalse, Qnil, rb_iter_break(), rb_yield(), RTEST, and VALUE.

Referenced by enum_all().

VALUE any_i VALUE  i,
VALUE memo
[static]
 

Definition at line 564 of file enum.c.

References Qnil, Qtrue, rb_iter_break(), RTEST, and VALUE.

Referenced by enum_any().

VALUE any_iter_i VALUE  i,
VALUE memo
[static]
 

Definition at line 552 of file enum.c.

References Qnil, Qtrue, rb_iter_break(), rb_yield(), RTEST, and VALUE.

Referenced by enum_any().

VALUE collect_all VALUE  i,
VALUE  ary
[static]
 

Definition at line 203 of file enum.c.

References Qnil, rb_ary_push(), and VALUE.

Referenced by enum_collect(), and enum_to_a().

VALUE collect_i VALUE  i,
VALUE  ary
[static]
 

Definition at line 194 of file enum.c.

References Qnil, rb_ary_push(), rb_yield(), and VALUE.

Referenced by enum_collect().

VALUE each_with_index_i VALUE  val,
VALUE memo
[static]
 

Definition at line 782 of file enum.c.

References INT2FIX, Qnil, rb_yield_values(), and VALUE.

Referenced by enum_each_with_index().

VALUE enum_all VALUE  obj  )  [static]
 

Definition at line 542 of file enum.c.

References all_i(), all_iter_i(), Qtrue, rb_block_given_p(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_any VALUE  obj  )  [static]
 

Definition at line 594 of file enum.c.

References any_i(), any_iter_i(), Qfalse, rb_block_given_p(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_collect VALUE  obj  )  [static]
 

Definition at line 225 of file enum.c.

References collect_all(), collect_i(), rb_ary_new(), rb_block_given_p(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_each_with_index VALUE  obj  )  [static]
 

Definition at line 807 of file enum.c.

References each_with_index_i(), rb_each(), rb_iterate(), rb_need_block(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_find int  argc,
VALUE argv,
VALUE  obj
[static]
 

Definition at line 108 of file enum.c.

References find_i(), NIL_P, Qnil, Qundef, rb_each(), rb_funcall(), rb_intern(), rb_iterate(), rb_scan_args(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_find_all VALUE  obj  )  [static]
 

Definition at line 151 of file enum.c.

References find_all_i(), rb_ary_new(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_grep VALUE  obj,
VALUE  pat
[static]
 

Definition at line 66 of file enum.c.

References grep_i(), grep_iter_i(), rb_ary_new(), rb_block_given_p(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_inject int  argc,
VALUE argv,
VALUE  obj
[static]
 

Definition at line 302 of file enum.c.

References inject_i(), Qnil, Qundef, rb_each(), rb_iterate(), rb_scan_args(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_max VALUE  obj  )  [static]
 

Definition at line 734 of file enum.c.

References max_i(), max_ii(), Qnil, Qundef, rb_block_given_p(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_member VALUE  obj,
VALUE  val
[static]
 

Definition at line 770 of file enum.c.

References member_i(), Qfalse, rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_min VALUE  obj  )  [static]
 

Definition at line 657 of file enum.c.

References min_i(), min_ii(), Qnil, Qundef, rb_block_given_p(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_partition VALUE  obj  )  [static]
 

Definition at line 341 of file enum.c.

References partition_i(), rb_ary_new(), rb_assoc_new(), rb_each(), rb_iterate(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_reject VALUE  obj  )  [static]
 

Definition at line 183 of file enum.c.

References rb_ary_new(), rb_each(), rb_iterate(), reject_i(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_sort VALUE  obj  )  [static]
 

Definition at line 371 of file enum.c.

References enum_to_a(), rb_ary_sort(), and VALUE.

Referenced by Init_Enumerable().

VALUE enum_sort_by VALUE  obj  )  [static]
 

Definition at line 473 of file enum.c.

References qsort, RARRAY, rb_ary_new(), rb_ary_new2(), rb_cArray, rb_each(), rb_eRuntimeError, rb_iterate(), rb_raise(), RBASIC, RNODE, sort_by_cmp(), sort_by_i(), T_ARRAY, TYPE, and VALUE.

Referenced by Init_Enumerable().

VALUE enum_to_a VALUE  obj  )  [static]
 

Definition at line 246 of file enum.c.

References collect_all(), rb_ary_new(), rb_each(), rb_iterate(), and VALUE.

Referenced by enum_sort(), and Init_Enumerable().

VALUE enum_zip int  argc,
VALUE argv,
VALUE  obj
[static]
 

Definition at line 866 of file enum.c.

References Qnil, rb_ary_new(), rb_ary_new4(), rb_block_given_p(), rb_convert_type(), rb_each(), rb_iterate(), T_ARRAY, VALUE, and zip_i().

Referenced by Init_Enumerable().

VALUE find_all_i VALUE  i,
VALUE  ary
[static]
 

Definition at line 128 of file enum.c.

References Qnil, rb_ary_push(), rb_yield(), RTEST, and VALUE.

Referenced by enum_find_all().

VALUE find_i VALUE  i,
VALUE memo
[static]
 

Definition at line 81 of file enum.c.

References Qnil, rb_iter_break(), rb_yield(), RTEST, and VALUE.

Referenced by enum_find().

VALUE grep_i VALUE  i,
VALUE arg
[static]
 

Definition at line 28 of file enum.c.

References id_eqq, Qnil, rb_ary_push(), rb_funcall(), RTEST, and VALUE.

Referenced by enum_grep().

VALUE grep_iter_i VALUE  i,
VALUE arg
[static]
 

Definition at line 38 of file enum.c.

References id_eqq, Qnil, rb_ary_push(), rb_funcall(), rb_yield(), RTEST, and VALUE.

Referenced by enum_grep().

void Init_Enumerable void   ) 
 

Definition at line 899 of file enum.c.

References enum_all(), enum_any(), enum_collect(), enum_each_with_index(), enum_find(), enum_find_all(), enum_grep(), enum_inject(), enum_max(), enum_member(), enum_min(), enum_partition(), enum_reject(), enum_sort(), enum_sort_by(), enum_to_a(), enum_zip(), id_cmp, id_each, id_eqq, rb_define_method(), rb_define_module(), rb_intern(), and rb_mEnumerable.

Referenced by rb_call_inits().

VALUE inject_i VALUE  i,
VALUE memo
[static]
 

Definition at line 257 of file enum.c.

References Qnil, Qundef, rb_yield_values(), and VALUE.

Referenced by enum_inject().

VALUE max_i VALUE  i,
VALUE memo
[static]
 

Definition at line 682 of file enum.c.

References id_cmp, Qnil, Qundef, rb_cmpint(), rb_funcall(), and VALUE.

Referenced by enum_max().

VALUE max_ii VALUE  i,
VALUE memo
[static]
 

Definition at line 701 of file enum.c.

References Qnil, Qundef, rb_cmpint(), rb_yield_values(), and VALUE.

Referenced by enum_max().

VALUE member_i VALUE  item,
VALUE memo
[static]
 

Definition at line 745 of file enum.c.

References Qnil, Qtrue, rb_equal(), rb_iter_break(), and VALUE.

Referenced by enum_member().

VALUE min_i VALUE  i,
VALUE memo
[static]
 

Definition at line 604 of file enum.c.

References id_cmp, Qnil, Qundef, rb_cmpint(), rb_funcall(), and VALUE.

Referenced by enum_min().

VALUE min_ii VALUE  i,
VALUE memo
[static]
 

Definition at line 623 of file enum.c.

References Qnil, Qundef, rb_cmpint(), rb_yield_values(), and VALUE.

Referenced by enum_min().

VALUE partition_i VALUE  i,
VALUE ary
[static]
 

Definition at line 316 of file enum.c.

References Qnil, rb_ary_push(), rb_yield(), RTEST, and VALUE.

Referenced by enum_partition().

VALUE reject_i VALUE  i,
VALUE  ary
[static]
 

Definition at line 162 of file enum.c.

References Qnil, rb_ary_push(), rb_yield(), RTEST, and VALUE.

Referenced by enum_reject().

int sort_by_cmp NODE **  aa,
NODE **  bb
[static]
 

Definition at line 394 of file enum.c.

References id_cmp, NODE, rb_cmpint(), rb_funcall(), and VALUE.

Referenced by enum_sort_by().

VALUE sort_by_i VALUE  i,
VALUE  ary
[static]
 

Definition at line 378 of file enum.c.

References NODE, NODE_MEMO, Qnil, rb_ary_push(), rb_eRuntimeError, rb_node_newnode(), rb_raise(), rb_yield(), RBASIC, and VALUE.

Referenced by enum_sort_by().

VALUE zip_i VALUE  val,
VALUE memo
[static]
 

Definition at line 818 of file enum.c.

References args, Qnil, RARRAY, rb_ary_entry(), rb_ary_new2(), rb_ary_push(), rb_ary_store(), rb_block_given_p(), rb_yield(), and VALUE.

Referenced by enum_zip().


Variable Documentation

ID id_cmp [static]
 

Definition at line 18 of file enum.c.

Referenced by Init_Enumerable(), max_i(), min_i(), and sort_by_cmp().

ID id_each [static]
 

Definition at line 18 of file enum.c.

Referenced by Init_Enumerable(), and rb_each().

ID id_eqq [static]
 

Definition at line 18 of file enum.c.

Referenced by grep_i(), grep_iter_i(), and Init_Enumerable().

VALUE rb_mEnumerable
 

Definition at line 17 of file enum.c.

Referenced by Init_Array(), Init_Enumerable(), Init_Hash(), Init_IO(), Init_Range(), Init_String(), and Init_Struct().


Generated on Wed Jan 18 23:32:08 2006 for Ruby by doxygen 1.3.5