From 8bbd94803062036850d2131d38b045f108338278 Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Sun, 3 Feb 2002 20:03:38 +0000 Subject: [PATCH] Remove debugging warning, be consistent about API fails. p4raw-id: //depot/perlio@14545 --- ext/Encode/Encode.xs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs index 22812ab..53167f4 100644 --- a/ext/Encode/Encode.xs +++ b/ext/Encode/Encode.xs @@ -309,12 +309,12 @@ PerlIOEncode_flush(pTHX_ PerlIO * f) XPUSHs(e->enc); SvCUR_set(e->bufsv, e->base.ptr - e->base.buf); SvUTF8_on(e->bufsv); - Perl_warn(aTHX_ "flush %_",e->bufsv); XPUSHs(e->bufsv); XPUSHs(&PL_sv_yes); PUTBACK; - if (perl_call_method("encode", G_SCALAR) != 1) - code = -1; + if (perl_call_method("encode", G_SCALAR) != 1) { + Perl_die(aTHX_ "panic: encode did not return a value"); + } SPAGAIN; str = POPs; PUTBACK; @@ -357,8 +357,9 @@ PerlIOEncode_flush(pTHX_ PerlIO * f) XPUSHs(str); XPUSHs(&PL_sv_yes); PUTBACK; - if (perl_call_method("encode", G_SCALAR) != 1) - code = -1; + if (perl_call_method("encode", G_SCALAR) != 1) { + Perl_die(aTHX_ "panic: encode did not return a value"); + } SPAGAIN; str = POPs; PUTBACK; -- 2.7.4