summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-06-21 08:46:57 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-06-21 08:46:57 +0000
commit00f5185623ac489efbed49ff4cbdf42316dcf5fd (patch)
treeaee00deea0299ae139646665d75b6bea26bdfd99 /perlio.c
parent2dc2558e5965ed21842375d8cc89de68e0c966e2 (diff)
downloadperl-00f5185623ac489efbed49ff4cbdf42316dcf5fd.tar.gz
Fix bug in optimized pseudo-layers.
p4raw-id: //depot/perlio@17335
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index f8d651728a..7c06b5a677 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1016,6 +1016,8 @@ PerlIO_push(pTHX_ PerlIO *f, PerlIO_funcs *tab, const char *mode, SV *arg)
}
else if (f) {
/* Pseudo-layer where push does its own stack adjust */
+ PerlIO_debug("PerlIO_push f=%p %s %s %p\n", (void*)f, tab->name,
+ (mode) ? mode : "(Null)", (void*)arg);
if ((*tab->Pushed) (aTHX_ f, mode, arg, tab) != 0) {
return NULL;
}
@@ -1697,7 +1699,7 @@ Perl_PerlIO_set_ptrcnt(pTHX_ PerlIO *f, STDCHAR * ptr, int cnt)
IV
PerlIOUtf8_pushed(pTHX_ PerlIO *f, const char *mode, SV *arg, PerlIO_funcs *tab)
{
- if (*PerlIONext(f)) {
+ if (PerlIOValid(f)) {
if (tab->kind & PERLIO_K_UTF8)
PerlIOBase(f)->flags |= PERLIO_F_UTF8;
else