1 #ifndef INTERNAL_RANGE_H /*-*-C-*-vi:se ft=c:*/
2 #define INTERNAL_RANGE_H
4 * @author Ruby developers <ruby-core@ruby-lang.org>
5 * @copyright This file is a part of the programming language Ruby.
6 * Permission is hereby granted, to either redistribute and/or
7 * modify this file, provided that the conditions mentioned in the
8 * file COPYING are met. Consult the file for details.
9 * @brief Internal header for Range.
11 #include "internal/struct.h" /* for RSTRUCT */
14 static inline VALUE
RANGE_BEG(VALUE r
);
15 static inline VALUE
RANGE_END(VALUE r
);
16 static inline VALUE
RANGE_EXCL(VALUE r
);
21 return RSTRUCT(r
)->as
.ary
[0];
27 return RSTRUCT_GET(r
, 1);
33 return RSTRUCT_GET(r
, 2);
37 rb_range_component_beg_len(VALUE b
, VALUE e
, int excl
,
38 long *begp
, long *lenp
, long len
, int err
);
40 #endif /* INTERNAL_RANGE_H */