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;
112 #define RMATCH_EXT(m) ((rb_matchext_t *)((char *)(m) + sizeof(struct RMatch)))
141 return &RMATCH_EXT(match)->regs;
Defines RBIMPL_ATTR_ARTIFICIAL.
#define RBIMPL_ATTR_ARTIFICIAL()
Wraps (or simulates) __attribute__((artificial))
#define inline
Old Visual Studio versions do not support the inline keyword, so we need to define it to be __inline.
Defines RBIMPL_ATTR_PURE.
#define RBIMPL_ATTR_PURE_UNLESS_DEBUG()
Enables RBIMPL_ATTR_PURE if and only if.
static struct re_registers * RMATCH_REGS(VALUE match)
Queries the raw re_registers.
Ruby object's base components.
Regular expression execution context.
VALUE regexp
The expression of this match.
struct RBasic basic
Basic part, including flags and class.
VALUE str
The target string that the match was made against.
struct rmatch_offset * char_offset
Capture group offsets, in C array.
int char_offset_num_allocated
Number of rmatch_offset that ::rmatch::char_offset holds.
struct re_registers regs
"Registers" of a match.
Represents the region of a capture group.
long beg
Beginning of a group.
uintptr_t VALUE
Type that represents a Ruby object.
Defines enum ruby_value_type.