diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-02-03 20:03:38 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2002-02-03 20:03:38 +0000 |
commit | 8bbd94803062036850d2131d38b045f108338278 (patch) | |
tree | 379b36b8ba35bf0e2a7fe866e84e7052331ae4d7 /ext | |
parent | 3aececdab11e76bf99d892f63f8a9048dedbc74d (diff) | |
download | perl-8bbd94803062036850d2131d38b045f108338278.tar.gz |
Remove debugging warning, be consistent about API fails.
p4raw-id: //depot/perlio@14545
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Encode/Encode.xs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs index 22812ab28a..53167f4695 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; |