summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2011-09-27 20:33:02 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:11 -0700
commit1fddc1283eec7855a9c74204f8f4db3b35be302a (patch)
treee32b6cc544b4f48534e66de23ade11c50829921c /doio.c
parentaa33328e822d3a36d7448488403f30a991f148b2 (diff)
downloadperl-1fddc1283eec7855a9c74204f8f4db3b35be302a.tar.gz
doio.c: Make warnings UTF8- and nul-clean
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/doio.c b/doio.c
index 022b499f59..9d06cbe402 100644
--- a/doio.c
+++ b/doio.c
@@ -126,8 +126,8 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
if (result == EOF && fd > PL_maxsysfd) {
/* Why is this not Perl_warn*() call ? */
PerlIO_printf(Perl_error_log,
- "Warning: unable to close filehandle %s properly.\n",
- GvENAME(gv));
+ "Warning: unable to close filehandle %"SVf" properly.\n",
+ SVfARG(sv_2mortal(newSVhek(GvENAME_HEK(gv)))));
}
IoOFP(io) = IoIFP(io) = NULL;
}
@@ -541,14 +541,14 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
if ((IoTYPE(io) == IoTYPE_RDONLY) &&
(fp == PerlIO_stdout() || fp == PerlIO_stderr())) {
Perl_warner(aTHX_ packWARN(WARN_IO),
- "Filehandle STD%s reopened as %s only for input",
+ "Filehandle STD%s reopened as %"SVf" only for input",
((fp == PerlIO_stdout()) ? "OUT" : "ERR"),
- GvENAME(gv));
+ SVfARG(sv_2mortal(newSVhek(GvENAME_HEK(gv)))));
}
else if ((IoTYPE(io) == IoTYPE_WRONLY) && fp == PerlIO_stdin()) {
Perl_warner(aTHX_ packWARN(WARN_IO),
- "Filehandle STDIN reopened as %s only for output",
- GvENAME(gv));
+ "Filehandle STDIN reopened as %"SVf" only for output",
+ SVfARG(sv_2mortal(newSVhek(GvENAME_HEK(gv)))));
}
}
@@ -1337,8 +1337,8 @@ Perl_my_lstat_flags(pTHX_ const U32 flags)
return PL_laststatval;
}
if (ckWARN(WARN_IO)) {
- Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %s",
- GvENAME(cGVOP_gv));
+ Perl_warner(aTHX_ packWARN(WARN_IO), "Use of -l on filehandle %"SVf,
+ SVfARG(sv_2mortal(newSVhek(GvENAME_HEK(cGVOP_gv)))));
}
return (PL_laststatval = -1);
}