summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-02-03 20:03:38 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-02-03 20:03:38 +0000
commit8bbd94803062036850d2131d38b045f108338278 (patch)
tree379b36b8ba35bf0e2a7fe866e84e7052331ae4d7 /ext
parent3aececdab11e76bf99d892f63f8a9048dedbc74d (diff)
downloadperl-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.xs11
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;