1 #ifndef RBIMPL_RREGEXP_H
2 #define RBIMPL_RREGEXP_H
25 #include "ruby/internal/cast.h"
37 #define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj))
45 #define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr)
47 #define RREGEXP_SRC RREGEXP_SRC
48 #define RREGEXP_SRC_PTR RREGEXP_SRC_PTR
49 #define RREGEXP_SRC_LEN RREGEXP_SRC_LEN
50 #define RREGEXP_SRC_END RREGEXP_SRC_END
53 struct re_patter_buffer;
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.
#define RREGEXP(obj)
Convenient casting macro.
static char * RREGEXP_SRC_END(VALUE rexp)
Convenient getter function.
static VALUE RREGEXP_SRC(VALUE rexp)
Convenient getter function.
static char * RREGEXP_SRC_PTR(VALUE rexp)
Convenient getter function.
static long RREGEXP_SRC_LEN(VALUE rexp)
Convenient getter function.
static char * RSTRING_END(VALUE str)
Queries the end of the contents pointer of the string.
static char * RSTRING_PTR(VALUE str)
Queries the contents pointer of the string.
static long RSTRING_LEN(VALUE str)
Queries the length of the string.
Ruby object's base components.
Ruby's regular expression.
struct RBasic basic
Basic part, including flags and class.
const VALUE src
Source code of this expression.
unsigned long usecnt
Reference count.
struct re_pattern_buffer * ptr
The pattern buffer.
uintptr_t VALUE
Type that represents a Ruby object.
Defines enum ruby_value_type.