From: Nicholas Clark Date: Tue, 8 Nov 2005 20:35:11 +0000 (+0000) Subject: 3 calls to strlen() we can avoid. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2b2a7552a15f8e825abc97e9ae95ff726e336474;p=p5sagit%2Fp5-mst-13.2.git 3 calls to strlen() we can avoid. p4raw-id: //depot/perl@26048 --- diff --git a/doio.c b/doio.c index 52b64d9..76a632a 100644 --- a/doio.c +++ b/doio.c @@ -408,7 +408,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, } else { if (!num_svs) { - namesv = sv_2mortal(newSVpvn(type,strlen(type))); + namesv = sv_2mortal(newSVpvn(type,tend - type)); num_svs = 1; svp = &namesv; type = Nullch; @@ -446,7 +446,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, } else { if (!num_svs) { - namesv = sv_2mortal(newSVpvn(type,strlen(type))); + namesv = sv_2mortal(newSVpvn(type,tend - type)); num_svs = 1; svp = &namesv; type = Nullch; @@ -538,7 +538,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, } else { if (!num_svs) { - namesv = sv_2mortal(newSVpvn(type,strlen(type))); + namesv = sv_2mortal(newSVpvn(type,tend - type)); num_svs = 1; svp = &namesv; type = Nullch;