From: Nick Ing-Simmons Date: Sat, 27 Apr 2002 16:34:48 +0000 (+0000) Subject: Correct which var is nulled, stack movement protection. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b683d952a173213146cd75796b01b79b8cc4a79;p=p5sagit%2Fp5-mst-13.2.git Correct which var is nulled, stack movement protection. p4raw-id: //depot/perlio@16221 --- diff --git a/ext/PerlIO/encoding/encoding.xs b/ext/PerlIO/encoding/encoding.xs index b93eacd..dc9bac2 100644 --- a/ext/PerlIO/encoding/encoding.xs +++ b/ext/PerlIO/encoding/encoding.xs @@ -161,7 +161,7 @@ PerlIOEncode_popped(pTHX_ PerlIO * f) } if (e->chk) { SvREFCNT_dec(e->chk); - e->dataSV = Nullsv; + e->chk = Nullsv; } return 0; } @@ -595,10 +595,16 @@ BOOT: * is invoked without prior "use Encode". -- dankogai */ if (!gv_stashpvn("Encode", 6, FALSE)) { +#if 0 + /* This would just be an irritant now loading works */ Perl_warner(aTHX_ packWARN(WARN_IO), ":encoding without 'use Encode'"); +#endif ENTER; + /* Encode needs a lot of stack - it is likely to move ... */ + PUTBACK; /* The SV is magically freed by load_module */ load_module(PERL_LOADMOD_NOIMPORT, newSVpvn("Encode", 6), Nullsv, Nullsv); + SPAGAIN; LEAVE; } PUSHMARK(sp);