diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-02-18 15:23:49 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-02-18 15:34:21 +0000 |
commit | 703c388dcb4a811f77272cdb5e507d0bbc23dca7 (patch) | |
tree | bb79bd6ae5c3ace6a95dd7b7ba49c9bcb29f34ea /regcomp.c | |
parent | 4d5229574fc575d9cb2e20434e81d0d371b1f54a (diff) | |
download | perl-703c388dcb4a811f77272cdb5e507d0bbc23dca7.tar.gz |
In Perl_reg_temp_copy(), ensure SvMAGIC() is NULL in the new REGEXP.
Change c2123ae380a372d5 exposed the fact that Perl_reg_temp_copy() didn't
reset SvMAGIC() to NULL after block copying the "parent" regexp. The analagous
problem with SvSTASH() was fixed with change b9ad13acb338e137.
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -9461,6 +9461,7 @@ Perl_reg_temp_copy (pTHX_ REGEXP *ret_x, REGEXP *rx) sizeof(regexp) - STRUCT_OFFSET(regexp, xpv_cur)); SvLEN_set(ret_x, 0); SvSTASH_set(ret_x, NULL); + SvMAGIC_set(ret_x, NULL); Newx(ret->offs, npar, regexp_paren_pair); Copy(r->offs, ret->offs, npar, regexp_paren_pair); if (r->substrs) { |