Ruby: internal/range.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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 */
14static inline VALUE RANGE_BEG(VALUE r);
15static inline VALUE RANGE_END(VALUE r);
16static inline VALUE RANGE_EXCL(VALUE r);
17
18static inline VALUE
19RANGE_BEG(VALUE r)
20{
21 return RSTRUCT(r)->as.ary[0];
22}
23
24static inline VALUE
25RANGE_END(VALUE r)
26{
27 return RSTRUCT(r)->as.ary[1];
28}
29
30static inline VALUE
31RANGE_EXCL(VALUE r)
32{
33 return RSTRUCT(r)->as.ary[2];
34}
35
36 VALUE
37rb_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 */
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40