summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-01-13 23:42:04 -0800
committerFather Chrysostomos <sprout@cpan.org>2012-01-13 23:42:04 -0800
commit81e9306fe8a12b70bdbd5c6cb413cb13cee4df4d (patch)
tree33b777a3218a1f12e9b65239b418e6f8e1455cd1
parenteb4c377af757baa899bb66137d53187fcea634db (diff)
downloadperl-81e9306fe8a12b70bdbd5c6cb413cb13cee4df4d.tar.gz
pp_sys.c:pp_fttest: Don’t set PL_statname to SvPV(PL_statname)
This is a waste of CPU cycles. PL_statname is always a PV.
-rw-r--r--pp_sys.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 1a84e109e7..41cf64dbb6 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -3323,7 +3323,6 @@ PP(pp_fttext)
? (IO *)PL_statgv
: GvIO(PL_statgv);
else {
- sv = PL_statname;
goto really_filename;
}
}
@@ -3366,10 +3365,10 @@ PP(pp_fttext)
}
}
else {
+ sv_setpv(PL_statname, SvPV_nomg_const_nolen(sv));
really_filename:
PL_statgv = NULL;
PL_laststype = OP_STAT;
- sv_setpv(PL_statname, SvPV_nomg_const_nolen(sv));
if (!(fp = PerlIO_open(SvPVX_const(PL_statname), "r"))) {
if (ckWARN(WARN_NEWLINE) && strchr(SvPV_nolen_const(PL_statname),
'\n'))