diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-01-02 13:47:42 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-01-02 13:47:42 +0000 |
commit | 288b8c02c5ee89a2978a1b9e56ed255c53beb793 (patch) | |
tree | 6ae37841e6bccf1a6b817df3291f10c4e3b1783d /pp_ctl.c | |
parent | 84679df57ca0626f7fb35fc3038e2e142b97f8a4 (diff) | |
download | perl-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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, \ |