From: Nicholas Clark Date: Tue, 5 Apr 2005 16:09:59 +0000 (+0000) Subject: Using savesvpv() here is terser and produces smaller object code. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=705bfa5f438d0b377898a48829d400d708246a4c;p=p5sagit%2Fp5-mst-13.2.git Using savesvpv() here is terser and produces smaller object code. p4raw-id: //depot/perl@24167 --- diff --git a/doio.c b/doio.c index e9effd9..26079cb 100644 --- a/doio.c +++ b/doio.c @@ -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 {