summaryrefslogtreecommitdiff
path: root/inline.h
diff options
context:
space:
mode:
authorRichard Leach <richardleach@users.noreply.github.com>2021-11-24 19:10:05 +0000
committerTony Cook <tony@develop-help.com>2021-11-29 10:07:19 +1100
commitc80a8618143e98aed6d9e5bbaee16d0308e211d0 (patch)
tree8ec167ae5402f841d06ff850da52458dabc94e17 /inline.h
parenteb87cedb600ef8f1265ce27b13197ca7cbc33297 (diff)
downloadperl-c80a8618143e98aed6d9e5bbaee16d0308e211d0.tar.gz
newSVpvn_flags(x, .. ,SVs_TEMP) more efficient than sv_2mortal(newSVpv(x,0))
Diffstat (limited to 'inline.h')
-rw-r--r--inline.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/inline.h b/inline.h
index 41da923991..b920cdf0f8 100644
--- a/inline.h
+++ b/inline.h
@@ -3407,7 +3407,7 @@ Perl_mortal_getenv(const char * str)
ret = getenv(str);
if (ret != NULL) {
- ret = SvPVX(sv_2mortal(newSVpv(ret, 0)));
+ ret = SvPVX( newSVpvn_flags(ret, strlen(ret) ,SVs_TEMP) );
}
GETENV_UNLOCK;