diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-02-18 20:07:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-02-18 20:07:39 +0000 |
commit | 7d0a29fec2f8bfc7e48abe23f1ebc308287c59c8 (patch) | |
tree | 64f184fb2e8d86f4b931facad02a62f37614b90c /perl.c | |
parent | b9f83d2f7c4cb24d96302c6fcaa5e60628fad1f8 (diff) | |
download | perl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |