summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-01-09 21:26:40 +0000
committerNicholas Clark <nick@ccl4.org>2005-01-09 21:26:40 +0000
commit2e0de35c58680e1e008b1d014c5b9ccec5b78282 (patch)
treeca49feb20f6ec1dffdbc11370070a0173467afe2 /regcomp.c
parent8a7a129d01690124356e6e97ab81becf500e68af (diff)
downloadperl-2e0de35c58680e1e008b1d014c5b9ccec5b78282.tar.gz
savepv(SvPV(sv,n_a)) is common, and creates an unnecessary call to
strlen(). Add savesvpv(sv), which gets the length from the SV, and returns a copy of its PV. p4raw-id: //depot/perl@23772
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regcomp.c b/regcomp.c
index bcfb2a3d80..6b34346fd9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4863,7 +4863,7 @@ Perl_regprop(pTHX_ SV *sv, regnode *o)
}
{
- char *s = savepv(SvPVX(lv));
+ char *s = savesvpv(lv);
char *origs = s;
while(*s && *s != '\n') s++;