summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-05-24 22:16:52 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-06-07 08:18:51 -0700
commit0223a80133899e1c84be7768d5224ee894e33c6f (patch)
treeb0baec353db8db1c5ff82d81de888da905429ef9 /util.c
parentc6e4ff343b63c6923b5be105aa9e384e8176673a (diff)
downloadperl-0223a80133899e1c84be7768d5224ee894e33c6f.tar.gz
util.c:report_wrongway_fh: Don’t create an SV
Now that sv_vcatpvfn supports HEKs directly, we don’t need to create a temporary SV out of one.
Diffstat (limited to 'util.c')
-rw-r--r--util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util.c b/util.c
index acde3983e7..c080dc0a4b 100644
--- a/util.c
+++ b/util.c
@@ -3716,15 +3716,15 @@ void
Perl_report_wrongway_fh(pTHX_ const GV *gv, const char have)
{
if (ckWARN(WARN_IO)) {
- SV * const name
+ HEK * const name
= gv && (isGV_with_GP(gv))
- ? sv_2mortal(newSVhek(GvENAME_HEK((gv))))
+ ? GvENAME_HEK((gv))
: NULL;
const char * const direction = have == '>' ? "out" : "in";
- if (name && SvPOK(name) && *SvPV_nolen(name))
+ if (name && *HEK_KEY(name))
Perl_warner(aTHX_ packWARN(WARN_IO),
- "Filehandle %"SVf" opened only for %sput",
+ "Filehandle %"HEKf" opened only for %sput",
name, direction);
else
Perl_warner(aTHX_ packWARN(WARN_IO),