Ruby: internal/range.h Source File

Ruby 3.4.3p32 (2025-04-14 revision d0b7e5b6a04bde21ca483d20a1546b28b401c2d4)

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
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 */
len
int len
Length of the buffer.
Definition io.h:8
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40