Ruby
2.4.2p198(2017-09-14revision59899)
|
Go to the source code of this file.
Macros | |
#define | id_cmp idCmp |
#define | id_succ idSucc |
#define | RANGE_BEG(r) (RSTRUCT(r)->as.ary[0]) |
#define | RANGE_END(r) (RSTRUCT(r)->as.ary[1]) |
#define | RANGE_EXCL(r) (RSTRUCT(r)->as.ary[2]) |
#define | RANGE_SET_BEG(r, v) (RSTRUCT_SET(r, 0, v)) |
#define | RANGE_SET_END(r, v) (RSTRUCT_SET(r, 1, v)) |
#define | RANGE_SET_EXCL(r, v) (RSTRUCT_SET(r, 2, v)) |
#define | RBOOL(v) ((v) ? Qtrue : Qfalse) |
#define | EXCL(r) RTEST(RANGE_EXCL(r)) |
#define | BSEARCH_CHECK(expr) |
#define | BSEARCH(conv) |
#define | rb_intern(str) rb_intern_const(str) |
Variables | |
VALUE | rb_cRange |
static ID | id_beg |
static ID | id_end |
static ID | id_excl |
static ID | id_integer_p |
static ID | id_div |
#define BSEARCH | ( | conv | ) |
Referenced by range_bsearch().
#define BSEARCH_CHECK | ( | expr | ) |
Referenced by range_bsearch().
#define EXCL | ( | r | ) | RTEST(RANGE_EXCL(r)) |
Definition at line 35 of file range.c.
Referenced by inspect_range(), r_cover_p(), range_bsearch(), range_each(), range_each_func(), range_exclude_end_p(), range_hash(), range_max(), range_min(), range_size(), range_step(), range_step_size(), range_to_s(), rb_range_values(), recursive_eql(), and recursive_equal().
#define id_cmp idCmp |
Definition at line 22 of file range.c.
Referenced by r_less(), range_bsearch(), range_check(), range_max(), and range_min().
#define id_succ idSucc |
Definition at line 23 of file range.c.
Referenced by discrete_object_p(), and range_each_func().
#define RANGE_BEG | ( | r | ) | (RSTRUCT(r)->as.ary[0]) |
Definition at line 27 of file range.c.
Referenced by inspect_range(), range_begin(), range_bsearch(), range_cover(), range_dumper(), range_each(), range_each_func(), range_first(), range_hash(), range_include(), range_max(), range_min(), range_size(), range_step(), range_step_size(), range_to_s(), rb_range_values(), recursive_eql(), and recursive_equal().
#define RANGE_END | ( | r | ) | (RSTRUCT(r)->as.ary[1]) |
Definition at line 28 of file range.c.
Referenced by inspect_range(), range_bsearch(), range_cover(), range_dumper(), range_each(), range_each_func(), range_end(), range_hash(), range_include(), range_last(), range_max(), range_min(), range_size(), range_step(), range_step_size(), range_to_s(), rb_range_values(), recursive_eql(), and recursive_equal().
#define RANGE_EXCL | ( | r | ) | (RSTRUCT(r)->as.ary[2]) |
Definition at line 29 of file range.c.
Referenced by range_dumper(), range_include(), and range_modify().
#define RANGE_SET_BEG | ( | r, | |
v | |||
) | (RSTRUCT_SET(r, 0, v)) |
Definition at line 30 of file range.c.
Referenced by range_init().
#define RANGE_SET_END | ( | r, | |
v | |||
) | (RSTRUCT_SET(r, 1, v)) |
Definition at line 31 of file range.c.
Referenced by range_init().
#define RANGE_SET_EXCL | ( | r, | |
v | |||
) | (RSTRUCT_SET(r, 2, v)) |
Definition at line 32 of file range.c.
Referenced by range_init().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
Referenced by Init_Range(), range_each(), range_eqq(), range_step(), and rb_range_values().
Definition at line 33 of file range.c.
Referenced by range_initialize(), range_loader(), and rb_range_new().
Definition at line 338 of file range.c.
References cmp(), idCmp, INT2FIX, rb_cmpint(), rb_cNumeric, rb_eArgError, rb_funcallv, rb_obj_is_kind_of(), rb_raise(), rb_to_int(), and zero().
Referenced by range_step(), and range_step_size().
|
static |
Definition at line 316 of file range.c.
References FALSE, id_succ, rb_cTime, rb_obj_is_kind_of(), and rb_respond_to().
Referenced by range_each(), and range_step().
|
static |
Definition at line 695 of file range.c.
References Qnil, and rb_yield().
Referenced by range_each().
|
static |
Definition at line 840 of file range.c.
References INT2NUM, NUM2LONG, Qnil, rb_ary_push(), and rb_iter_break().
Referenced by range_first().
void Init_Range | ( | void | ) |
Definition at line 1316 of file range.c.
References id_beg, id_div, id_end, id_excl, id_integer_p, NULL, range_alloc(), range_begin(), range_bsearch(), range_cover(), range_dumper(), range_each(), range_end(), range_eq(), range_eql(), range_eqq(), range_exclude_end_p(), range_first(), range_hash(), range_include(), range_initialize(), range_initialize_copy(), range_inspect(), range_last(), range_loader(), range_max(), range_min(), range_size(), range_step(), range_to_s(), rb_cObject, rb_cRange, rb_define_method(), rb_include_module(), rb_intern, rb_marshal_define_compat(), rb_mEnumerable, and rb_struct_define_without_accessor().
Definition at line 1086 of file range.c.
References EXCL, OBJ_INFECT, RANGE_BEG, RANGE_END, rb_inspect(), rb_str_append(), rb_str_cat(), rb_str_dup(), and rb_str_new2.
Referenced by range_inspect().
|
static |
Definition at line 518 of file range.c.
References id_integer_p, Qundef, rb_check_funcall(), and RTEST.
Referenced by range_bsearch().
|
static |
Definition at line 323 of file range.c.
References BUILTIN_TYPE, FALSE, FIXNUM_P, FLONUM_P, rb_cNumeric, rb_cTime, rb_obj_is_kind_of(), SPECIAL_CONST_P, T_BIGNUM, T_FLOAT, and TRUE.
Referenced by range_include().
Definition at line 1207 of file range.c.
References EXCL, Qfalse, Qtrue, and r_less().
Referenced by range_cover(), and range_include().
Definition at line 181 of file range.c.
References id_cmp, NIL_P, rb_cmpint(), and rb_funcall().
Referenced by r_cover_p(), and range_each_func().
Definition at line 1251 of file range.c.
References rb_struct_alloc_noinit().
Referenced by Init_Range().
Definition at line 577 of file range.c.
References BSEARCH, BSEARCH_CHECK, EXCL, FIX2LONG, FIXNUM_P, id_cmp, id_div, INT2FIX, is_integer_p(), Qnil, range, RANGE_BEG, RANGE_END, rb_cmpint(), rb_equal(), rb_eTypeError, rb_Float(), rb_funcall(), rb_obj_classname(), rb_raise(), rb_to_int(), RB_TYPE_P, RETURN_ENUMERATOR, RFLOAT_VALUE, and T_FLOAT.
Referenced by Init_Range().
Definition at line 45 of file range.c.
References id_cmp, and rb_funcall().
Referenced by range_init().
Definition at line 1197 of file range.c.
References r_cover_p(), RANGE_BEG, and RANGE_END.
Referenced by Init_Range().
Definition at line 1218 of file range.c.
References FL_WB_PROTECTED, id_beg, id_end, id_excl, NEWOBJ_OF, RANGE_BEG, RANGE_END, RANGE_EXCL, rb_cObject, rb_ivar_set(), RGENGC_WB_PROTECTED_OBJECT, and T_OBJECT.
Referenced by Init_Range().
Definition at line 758 of file range.c.
References discrete_object_p(), each_i(), EXCL, FIX2LONG, FIXNUM_P, LONG2FIX, NIL_P, Qfalse, Qtrue, range, RANGE_BEG, range_each_func(), RANGE_END, range_enum_size(), rb_block_call(), rb_check_string_type(), rb_eTypeError, rb_intern, rb_obj_classname(), rb_raise(), rb_sym2str, rb_yield(), RETURN_SIZED_ENUMERATOR, sym_each_i(), and SYMBOL_P.
Referenced by Init_Range().
|
static |
Definition at line 257 of file range.c.
References EXCL, id_succ, r_less(), RANGE_BEG, RANGE_END, and rb_funcallv.
Referenced by range_each(), and range_step().
Definition at line 165 of file range.c.
References Qfalse, Qtrue, rb_cRange, rb_exec_recursive_paired(), rb_obj_is_kind_of(), and recursive_equal().
Referenced by Init_Range().
Definition at line 219 of file range.c.
References Qfalse, Qtrue, rb_cRange, rb_exec_recursive_paired(), rb_obj_is_kind_of(), and recursive_eql().
Referenced by Init_Range().
Definition at line 1139 of file range.c.
References rb_funcall(), and rb_intern.
Referenced by Init_Range().
|
static |
Definition at line 38 of file range.c.
References Qnil, rb_eArgError, and rb_raise().
Referenced by range_init().
Definition at line 867 of file range.c.
References first_i(), NUM2LONG, RANGE_BEG, rb_ary_new2, rb_block_call(), and rb_scan_args().
Referenced by Init_Range(), and range_min().
Definition at line 240 of file range.c.
References EXCL, hash(), LONG2FIX, NUM2LONG, RANGE_BEG, RANGE_END, rb_hash(), rb_hash_end(), rb_hash_start(), and rb_hash_uint().
Referenced by Init_Range().
Definition at line 1160 of file range.c.
References FIXNUM_P, linear_object_p(), NIL_P, r_cover_p(), RANGE_BEG, RANGE_END, RANGE_EXCL, rb_call_super(), rb_check_to_integer(), rb_str_include_range_p(), RB_TYPE_P, and T_STRING.
Referenced by Init_Range().
Definition at line 51 of file range.c.
References FIXNUM_P, NIL_P, range_check(), range_failed(), RANGE_SET_BEG, RANGE_SET_END, RANGE_SET_EXCL, and rb_rescue().
Referenced by range_initialize(), range_loader(), and rb_range_new().
Definition at line 100 of file range.c.
References Qnil, range_init(), range_modify(), rb_scan_args(), RBOOL, and RTEST.
Referenced by Init_Range().
Definition at line 112 of file range.c.
References range, range_modify(), and rb_struct_init_copy().
Referenced by Init_Range().
Definition at line 1114 of file range.c.
References inspect_range(), and rb_exec_recursive().
Referenced by Init_Range().
Definition at line 900 of file range.c.
References RANGE_END, rb_Array(), and rb_ary_last().
Referenced by Init_Range().
Definition at line 1232 of file range.c.
References id_beg, id_end, id_excl, NIL_P, range, range_init(), range_modify(), rb_cObject, rb_eTypeError, rb_ivar_get(), rb_raise(), RB_TYPE_P, RBASIC, RBOOL, RTEST, and T_OBJECT.
Referenced by Init_Range().
Definition at line 963 of file range.c.
References EXCL, FIX2LONG, FIXNUM_P, id_cmp, INT2FIX, LONG2NUM, Qnil, RANGE_BEG, RANGE_END, rb_block_given_p(), rb_call_super(), rb_cInteger, rb_cmpint(), rb_cNumeric, rb_eTypeError, rb_funcall(), rb_obj_is_kind_of(), and rb_raise().
Referenced by Init_Range().
Definition at line 926 of file range.c.
References EXCL, id_cmp, Qnil, RANGE_BEG, RANGE_END, range_first(), rb_block_given_p(), rb_call_super(), rb_cmpint(), and rb_funcall().
Referenced by Init_Range().
|
static |
Definition at line 81 of file range.c.
References ID2SYM, Qnil, RANGE_EXCL, rb_check_frozen, and rb_name_err_raise.
Referenced by range_initialize(), range_initialize_copy(), and range_loader().
Definition at line 721 of file range.c.
References EXCL, INT2FIX, Qnil, RANGE_BEG, RANGE_END, rb_cNumeric, rb_obj_is_kind_of(), and ruby_num_interval_step_size().
Referenced by Init_Range(), and range_enum_size().
Definition at line 405 of file range.c.
References check_step_domain(), DBL2NUM, discrete_object_p(), EXCL, FIX2LONG, FIXNUM_P, idLE, INT2FIX, INT2NUM, LONG2NUM, NIL_P, Qfalse, Qtrue, range, RANGE_BEG, range_each_func(), RANGE_END, range_step_size(), rb_block_call(), rb_check_string_type(), rb_check_to_integer(), rb_cNumeric, rb_eTypeError, rb_funcall(), rb_intern, rb_obj_classname(), rb_obj_is_kind_of(), rb_raise(), rb_scan_args(), rb_sym2str, rb_yield(), RETURN_SIZED_ENUMERATOR, RTEST, ruby_float_step(), step_i(), sym_step_i(), and SYMBOL_P.
Referenced by Init_Range().
Definition at line 356 of file range.c.
References check_step_domain(), EXCL, INT2FIX, Qnil, RANGE_BEG, RANGE_END, RARRAY_AREF, rb_cNumeric, rb_obj_is_kind_of(), and ruby_num_interval_step_size().
Referenced by range_step().
Definition at line 1071 of file range.c.
References EXCL, OBJ_INFECT, RANGE_BEG, RANGE_END, rb_obj_as_string(), rb_str_append(), rb_str_cat(), and rb_str_dup().
Referenced by Init_Range().
Definition at line 1019 of file range.c.
References len, NUM2LONG, Qfalse, Qnil, Qtrue, rb_eRangeError, rb_raise(), and rb_range_values().
Referenced by match_ary_aref(), rb_ary_aref(), rb_ary_aset(), rb_ary_fill(), rb_ary_slice_bang(), rb_get_values_at(), rb_str_aref(), rb_str_aset(), str_byte_aref(), and vm_backtrace_to_ary().
Definition at line 72 of file range.c.
References range, range_init(), rb_cRange, rb_obj_alloc(), and RBOOL.
Referenced by ibf_load_object_struct(), and iseq_compile_each().
Definition at line 995 of file range.c.
References EXCL, id_beg, id_end, Qfalse, Qtrue, RANGE_BEG, RANGE_END, rb_cRange, rb_funcall(), rb_intern, rb_obj_is_kind_of(), rb_respond_to(), and RTEST.
Referenced by enum_sum(), ibf_dump_object_struct(), range_values(), and rb_range_beg_len().
Definition at line 136 of file range.c.
References EXCL, Qfalse, Qtrue, RANGE_BEG, RANGE_END, and rb_equal().
Referenced by range_eq().
|
static |
Definition at line 298 of file range.c.
References FIXNUM_FLAG, FIXNUM_P, INT2FIX, Qnil, rb_funcall(), and rb_yield().
Referenced by range_step().
|
static |
Definition at line 702 of file range.c.
References Qnil, rb_str_intern(), and rb_yield().
Referenced by range_each().
|
static |
Definition at line 280 of file range.c.
References FIXNUM_FLAG, FIXNUM_P, INT2FIX, Qnil, rb_funcall(), rb_str_intern(), and rb_yield().
Referenced by range_step().
|
static |
Definition at line 21 of file range.c.
Referenced by Init_Range(), range_dumper(), range_loader(), and rb_range_values().
|
static |
Definition at line 21 of file range.c.
Referenced by Init_Range(), and range_bsearch().
|
static |
Definition at line 21 of file range.c.
Referenced by Init_Range(), range_dumper(), range_loader(), and rb_range_values().
|
static |
Definition at line 21 of file range.c.
Referenced by Init_Range(), range_dumper(), and range_loader().
|
static |
Definition at line 21 of file range.c.
Referenced by Init_Range(), and is_integer_p().
VALUE rb_cRange |
Definition at line 20 of file range.c.
Referenced by Init_Range(), range_eq(), range_eql(), rb_range_new(), and rb_range_values().