summaryrefslogtreecommitdiffhomepage
path: root/src/re.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/re.h')
-rw-r--r--src/re.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/re.h b/src/re.h
index 686120569..238b4e408 100644
--- a/src/re.h
+++ b/src/re.h
@@ -37,23 +37,23 @@ struct rmatch {
//};
struct RMatch {
MRUBY_OBJECT_HEADER;
- mrb_value str;
+ struct RString *str;
struct rmatch *rmatch;
- mrb_value regexp; /* RRegexp */
+ struct RRegexp *regexp;
};
struct RRegexp {
MRUBY_OBJECT_HEADER;
struct re_pattern_buffer *ptr;
- mrb_value src;
+ struct RString *src;
unsigned long usecnt;
};
#define mrb_regex_ptr(r) ((struct RRegexp*)((r).value.p))
#define RREGEXP(r) ((struct RRegexp*)((r).value.p))
#define RREGEXP_SRC(r) (RREGEXP(r)->src)
-#define RREGEXP_SRC_PTR(r) (((struct RString*)(RREGEXP_SRC(r).value.p))->buf)
-#define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src)
+#define RREGEXP_SRC_PTR(r) (RREGEXP_SRC(r)->buf)
+#define RREGEXP_SRC_LEN(r) (RREGEXP_SRC(r)->len)
int re_adjust_startpos(struct re_pattern_buffer *bufp, const char *string, int size, int startpos, int range);
typedef struct re_pattern_buffer Regexp;