summaryrefslogtreecommitdiff
path: root/ext/strscan/strscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/strscan/strscan.c')
-rw-r--r--ext/strscan/strscan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/strscan/strscan.c b/ext/strscan/strscan.c
index f7592c9..e75bf66 100644
--- a/ext/strscan/strscan.c
+++ b/ext/strscan/strscan.c
@@ -460,7 +460,7 @@ strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
p->regex = regex;
re = rb_reg_prepare_re(regex, p->str);
- tmpreg = re != RREGEXP(regex)->ptr;
+ tmpreg = re != RREGEXP_PTR(regex);
if (!tmpreg) RREGEXP(regex)->usecnt++;
if (headonly) {
@@ -480,8 +480,8 @@ strscan_do_scan(VALUE self, VALUE regex, int succptr, int getstr, int headonly)
onig_free(re);
}
else {
- onig_free(RREGEXP(regex)->ptr);
- RREGEXP(regex)->ptr = re;
+ onig_free(RREGEXP_PTR(regex));
+ RREGEXP_PTR(regex) = re;
}
}
@@ -978,7 +978,7 @@ name_to_backref_number(struct re_registers *regs, VALUE regexp, const char* name
{
int num;
- num = onig_name_to_backref_number(RREGEXP(regexp)->ptr,
+ num = onig_name_to_backref_number(RREGEXP_PTR(regexp),
(const unsigned char* )name, (const unsigned char* )name_end, regs);
if (num >= 1) {
return num;