summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorReini Urban <rurban@x-ray.at>2008-06-09 19:15:41 +0200
committerNicholas Clark <nick@ccl4.org>2008-06-09 18:18:57 +0000
commit3ec35e0f92217816d70cf483b3b012476ca9b9d7 (patch)
tree49031891098e3c1d775c02af5966e6fba519ed96 /regcomp.c
parente5ae200f29f943d2dad731c89f20babe8c7c8786 (diff)
downloadperl-3ec35e0f92217816d70cf483b3b012476ca9b9d7.tar.gz
Re: [PATCH] More COW lvalues
Message-ID: <484D491D.9050704@x-ray.at> Date: Mon, 09 Jun 2008 17:15:41 +0200 p4raw-id: //depot/perl@34038
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 9d8008e6e9..6a77d5566f 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -5669,13 +5669,17 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth)
pv = (I32*)SvGROW(sv_dat, SvCUR(sv_dat) + sizeof(I32)+1);
SvCUR_set(sv_dat, SvCUR(sv_dat) + sizeof(I32));
pv[count] = RExC_npar;
- SvIVX(sv_dat)++;
+#ifdef PERL_DEBUG_COW
+ ((XPVIV*) SvANY(sv_dat))->xiv_iv++;
+#else
+ SvIVX(sv_dat)++;
+#endif
}
} else {
(void)SvUPGRADE(sv_dat,SVt_PVNV);
sv_setpvn(sv_dat, (char *)&(RExC_npar), sizeof(I32));
SvIOK_on(sv_dat);
- SvIVX(sv_dat)= 1;
+ SvIV_set(sv_dat, 1);
}
#ifdef DEBUGGING
if (!av_store(RExC_paren_name_list, RExC_npar, SvREFCNT_inc(svname)))