summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-02-18 20:07:39 +0000
committerNicholas Clark <nick@ccl4.org>2007-02-18 20:07:39 +0000
commit7d0a29fec2f8bfc7e48abe23f1ebc308287c59c8 (patch)
tree64f184fb2e8d86f4b931facad02a62f37614b90c /perl.c
parentb9f83d2f7c4cb24d96302c6fcaa5e60628fad1f8 (diff)
downloadperl-7d0a29fec2f8bfc7e48abe23f1ebc308287c59c8.tar.gz
More efficient to call newSV_type() then SvGROW() instead of newSV()
with a size then sv_upgrade(), as the latter calls sv_upgrade() twice. p4raw-id: //depot/perl@30348
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 4dfea50763..c7ed5923f1 100644
--- a/perl.c
+++ b/perl.c
@@ -262,8 +262,8 @@ perl_construct(pTHXx)
if (!PL_linestr) {
PL_curcop = &PL_compiling; /* needed by ckWARN, right away */
- PL_linestr = newSV(79);
- sv_upgrade(PL_linestr,SVt_PVIV);
+ PL_linestr = newSV_type(SVt_PVIV);
+ SvGROW(PL_linestr, 80);
if (!SvREADONLY(&PL_sv_undef)) {
/* set read-only and try to insure than we wont see REFCNT==0