summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-02 13:47:42 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-02 13:47:42 +0000
commit288b8c02c5ee89a2978a1b9e56ed255c53beb793 (patch)
tree6ae37841e6bccf1a6b817df3291f10c4e3b1783d /pp_ctl.c
parent84679df57ca0626f7fb35fc3038e2e142b97f8a4 (diff)
downloadperl-288b8c02c5ee89a2978a1b9e56ed255c53beb793.tar.gz
Make struct regexp the body of SVt_REGEXP SVs, REGEXPs become SVs,
and regexp reference counting is via the regular SV reference counting. This was not as easy at it looks. p4raw-id: //depot/perl@32804
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index ae0c61e046..8681cd9767 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -117,7 +117,7 @@ PP(pp_regcomp)
if (SvROK(tmpstr)) {
SV * const sv = SvRV(tmpstr);
if (SvTYPE(sv) == SVt_REGEXP)
- re = ((struct xregexp *)SvANY(sv))->xrx_regexp;
+ re = sv;
}
if (re) {
re = reg_temp_copy(re);
@@ -3905,11 +3905,11 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
# define SM_REGEX ( \
(SvROK(d) && (SvTYPE(This = SvRV(d)) == SVt_REGEXP) \
- && (this_regex = ((struct xregexp *)SvANY(This))->xrx_regexp) \
+ && (this_regex = This) \
&& (Other = e)) \
|| \
(SvROK(e) && (SvTYPE(This = SvRV(e)) == SVt_REGEXP) \
- && (this_regex = ((struct xregexp *)SvANY(This))->xrx_regexp) \
+ && (this_regex = This) \
&& (Other = d)) )
@@ -3918,7 +3918,7 @@ S_do_smartmatch(pTHX_ HV *seen_this, HV *seen_other)
# define SM_OTHER_REGEX (SvROK(Other) \
&& (SvTYPE(SvRV(Other)) == SVt_REGEXP) \
- && (other_regex = ((struct xregexp *)SvANY(SvRV(Other)))->xrx_regexp))
+ && (other_regex = SvRV(Other)))
# define SM_SEEN_THIS(sv) hv_exists_ent(seen_this, \