summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-05 15:02:25 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-05 15:02:25 +0000
commit9d17798df32f4f48ca213b9ca03a2278ced586f5 (patch)
tree1a3b97aa48a5b5deb0175ae6856f7898c8e3dc98 /regcomp.c
parente16f71082347dd9854a05b7cece1dc02f0f9f3a8 (diff)
downloadperl-9d17798df32f4f48ca213b9ca03a2278ced586f5.tar.gz
Abolish wraplen from struct regexp. We're already storing it in SvCUR.
p4raw-id: //depot/perl@32845
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 3c9915f356..48822a6e4d 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4290,12 +4290,12 @@ redo_first_pass:
>> RXf_PMf_STD_PMMOD_SHIFT);
const char *fptr = STD_PAT_MODS; /*"msix"*/
char *p;
- RX_WRAPLEN(rx) = plen + has_minus + has_p + has_runon
+ const STRLEN wraplen = plen + has_minus + has_p + has_runon
+ (sizeof(STD_PAT_MODS) - 1)
+ (sizeof("(?:)") - 1);
- p = sv_grow(rx, RX_WRAPLEN(rx) + 1);
- SvCUR_set(rx, RX_WRAPLEN(rx));
+ p = sv_grow(rx, wraplen + 1);
+ SvCUR_set(rx, wraplen);
SvPOK_on(rx);
*p++='('; *p++='?';
if (has_p)