1 #ifndef RBIMPL_RMATCH_H
2 #define RBIMPL_RMATCH_H
25 #include "ruby/internal/cast.h"
37 #define RMATCH(obj) RBIMPL_CAST((struct RMatch *)(obj))
39 #define RMATCH_REGS RMATCH_REGS
42 struct re_patter_buffer;
143 return &
RMATCH(match)->rmatch->regs;
Defines RBIMPL_ATTR_ARTIFICIAL.
#define RBIMPL_ATTR_ARTIFICIAL()
Wraps (or simulates) __attribute__((artificial))
#define RBIMPL_ASSERT_OR_ASSUME(expr)
This is either RUBY_ASSERT or RBIMPL_ASSUME, depending on RUBY_DEBUG.
Defines RBIMPL_ATTR_PURE.
#define RBIMPL_ATTR_PURE_UNLESS_DEBUG()
Enables RBIMPL_ATTR_PURE if and only if.
#define RMATCH(obj)
Convenient casting macro.
static struct re_registers * RMATCH_REGS(VALUE match)
Queries the raw re_registers.
Ruby's object's, base components.
Regular expression execution context.
VALUE regexp
The expression of this match.
struct rmatch * rmatch
The result of this match.
struct RBasic basic
Basic part, including flags and class.
VALUE str
The target string that the match was made against.
Represents the region of a capture group.
long beg
Beginning of a group.
int char_offset_num_allocated
Number of rmatch_offset that rmatch::char_offset holds.
struct rmatch_offset * char_offset
Capture group offsets, in C array.
struct re_registers regs
"Registers" of a match.
uintptr_t VALUE
Type that represents a Ruby object.
Defines enum ruby_value_type.