Ruby  3.1.4p223 (2023-03-30 revision HEAD)
range.h
1 #ifndef INTERNAL_RANGE_H /*-*-C-*-vi:se ft=c:*/
2 #define INTERNAL_RANGE_H
11 #include "internal/struct.h" /* for RSTRUCT */
12 
13 /* range.c */
14 static inline VALUE RANGE_BEG(VALUE r);
15 static inline VALUE RANGE_END(VALUE r);
16 static inline VALUE RANGE_EXCL(VALUE r);
17 
18 static inline VALUE
19 RANGE_BEG(VALUE r)
20 {
21  return RSTRUCT(r)->as.ary[0];
22 }
23 
24 static inline VALUE
25 RANGE_END(VALUE r)
26 {
27  return RSTRUCT(r)->as.ary[1];
28 }
29 
30 static inline VALUE
31 RANGE_EXCL(VALUE r)
32 {
33  return RSTRUCT(r)->as.ary[2];
34 }
35 
36 VALUE
37 rb_range_component_beg_len(VALUE b, VALUE e, int excl,
38  long *begp, long *lenp, long len, int err);
39 
40 #endif /* INTERNAL_RANGE_H */
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40