From 0223a80133899e1c84be7768d5224ee894e33c6f Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Thu, 24 May 2012 22:16:52 -0700 Subject: [PATCH] =?utf8?q?util.c:report=5Fwrongway=5Ffh:=20Don=E2=80=99t?= =?utf8?q?=20create=20an=20SV?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Now that sv_vcatpvfn supports HEKs directly, we don’t need to create a temporary SV out of one. --- util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util.c b/util.c index acde398..c080dc0 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), -- 1.8.3.1