Ruby: internal/range.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

range.h
Go to the documentation of this file.
1#ifndef INTERNAL_RANGE_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_RANGE_H
12#include "internal/struct.h" /* for RSTRUCT */
13
14/* range.c */
15static inline VALUE RANGE_BEG(VALUE r);
16static inline VALUE RANGE_END(VALUE r);
17static inline VALUE RANGE_EXCL(VALUE r);
18
19static inline VALUE
20RANGE_BEG(VALUE r)
21{
22 return RSTRUCT(r)->as.ary[0];
23}
24
25static inline VALUE
26RANGE_END(VALUE r)
27{
28 return RSTRUCT(r)->as.ary[1];
29}
30
31static inline VALUE
32RANGE_EXCL(VALUE r)
33{
34 return RSTRUCT(r)->as.ary[2];
35}
36
37 VALUE
38 rb_range_component_beg_len(VALUE b, VALUE e, int excl,
39 long *begp, long *lenp, long len, int err);
40
41#endif /* INTERNAL_RANGE_H */
len
uint8_t len
Definition: escape.c:17
rb_range_component_beg_len
VALUE rb_range_component_beg_len(VALUE b, VALUE e, int excl, long *begp, long *lenp, long len, int err)
Definition: range.c:1362
struct.h
Internal header for Struct.
RSTRUCT
#define RSTRUCT(obj)
Definition: struct.h:34
VALUE
unsigned long VALUE
Definition: value.h:38
err
int err
Definition: win32.c:142