diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-04-05 16:09:59 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-04-05 16:09:59 +0000 |
commit | 705bfa5f438d0b377898a48829d400d708246a4c (patch) | |
tree | e80c2e75e8497cb6d9c4adcbdf06659fbd3217cd /doio.c | |
parent | 628bbff0c15c13c4704c1f63e1b8dac4c47eb639 (diff) | |
download | perl-705bfa5f438d0b377898a48829d400d708246a4c.tar.gz |
Using savesvpv() here is terser and produces smaller object code.
p4raw-id: //depot/perl@24167
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -219,7 +219,6 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw, if (num_svs) { /* New style explicit name, type is just mode and layer info */ - STRLEN l = 0; #ifdef USE_STDIO if (SvROK(*svp) && !strchr(name,'&')) { if (ckWARN(WARN_IO)) @@ -229,9 +228,7 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw, goto say_false; } #endif /* USE_STDIO */ - name = SvOK(*svp) ? SvPV(*svp, l) : ""; - len = (I32)l; - name = savepvn(name, len); + name = SvOK(*svp) ? savesvpv (*svp) : savepvn ("", 0); SAVEFREEPV(name); } else { |