Ruby 3.5.0dev (2025-01-10 revision 5fab31b15e32622c4b71d1d347a41937e9f9c212)
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_GET(r, 1);
28}
29
30static inline VALUE
31RANGE_EXCL(VALUE r)
32{
33 return RSTRUCT_GET(r, 2);
34}
35
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 */
int len
Length of the buffer.
Definition io.h:8
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40