|
Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
#include "ruby/internal/config.h"#include <assert.h>#include <math.h>#include "id.h"#include "internal.h"#include "internal/array.h"#include "internal/compar.h"#include "internal/enum.h"#include "internal/enumerator.h"#include "internal/error.h"#include "internal/numeric.h"#include "internal/range.h"Go to the source code of this file.
Macros | |
| #define | id_cmp idCmp |
| #define | id_succ idSucc |
| #define | id_min idMin |
| #define | id_max idMax |
| #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) |
Functions | |
| VALUE | rb_range_new (VALUE beg, VALUE end, int exclude_end) |
| int | rb_range_values (VALUE range, VALUE *begp, VALUE *endp, int *exclp) |
| VALUE | rb_range_component_beg_len (VALUE b, VALUE e, int excl, long *begp, long *lenp, long len, int err) |
| VALUE | rb_range_beg_len (VALUE range, long *begp, long *lenp, long len, int err) |
| void | Init_Range (void) |
Variables | |
| VALUE | rb_cRange |
| #define BSEARCH | ( | conv | ) |
| #define BSEARCH_CHECK | ( | expr | ) |
| #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)) |
| void Init_Range | ( | void | ) |
Definition at line 1844 of file range.c.
References NULL, rb_cObject, rb_cRange, rb_define_method, rb_include_module(), rb_marshal_define_compat(), rb_mEnumerable, and rb_struct_define_without_accessor().
Definition at line 1398 of file range.c.
References err, len, NIL_P, PRIsVALUE, Qfalse, range, rb_eRangeError, rb_raise(), rb_range_component_beg_len(), and rb_range_values().
Referenced by rb_get_values_at().
| VALUE rb_range_component_beg_len | ( | VALUE | b, |
| VALUE | e, | ||
| int | excl, | ||
| long * | begp, | ||
| long * | lenp, | ||
| long | len, | ||
| int | err | ||
| ) |
Definition at line 1362 of file range.c.
References err, len, NIL_P, NUM2LONG, Qnil, and Qtrue.
Referenced by rb_arithmetic_sequence_beg_len_step(), and rb_range_beg_len().
Definition at line 1310 of file range.c.
References EXCL, Qfalse, Qtrue, Qundef, range, rb_cArithSeq, rb_check_funcall(), rb_cRange, rb_intern(), rb_obj_is_kind_of(), and RTEST.
Referenced by rb_arithmetic_sequence_extract(), and rb_range_beg_len().
| VALUE rb_cRange |
Definition at line 31 of file range.c.
Referenced by Init_Range(), rb_range_new(), and rb_range_values().