From: Nick Ing-Simmons Date: Sun, 3 Feb 2002 20:03:38 +0000 (+0000) Subject: Remove debugging warning, be consistent about API fails. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8bbd94803062036850d2131d38b045f108338278;p=p5sagit%2Fp5-mst-13.2.git Remove debugging warning, be consistent about API fails. p4raw-id: //depot/perlio@14545 --- 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;