diff options
author | David Mitchell <davem@iabyn.com> | 2010-09-20 22:14:23 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2010-09-20 22:14:23 +0100 |
commit | 68b590d93559da1f7a0d3956202180d507013365 (patch) | |
tree | 9dc4837a540d2ecf0644565a2a73ad2cb9e0d584 /pp_hot.c | |
parent | e4487e9b537f1be1e95aba1c87790c2a411788a7 (diff) | |
download | perl-68b590d93559da1f7a0d3956202180d507013365.tar.gz |
call defout/stderr destructors last
When calling the destructors for IO objects embedded in arena GVs,
process PL_defoutgv and PL_stderrgv last. Yes, the test suite
expects STDOUT to still work at this point. Indeed, one test in ref.t
calls print from STDOUT's destructor (which is why pp_print needed a
slight tweak to handle a null GV properly).
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -751,7 +751,7 @@ PP(pp_print) RETURN; } if (!(io = GvIO(gv))) { - if ((GvEGVx(gv)) && (io = GvIO(GvEGV(gv))) + if ( gv && GvEGVx(gv) && (io = GvIO(GvEGV(gv))) && (mg = SvTIED_mg((const SV *)io, PERL_MAGIC_tiedscalar))) goto had_magic; if (ckWARN2(WARN_UNOPENED,WARN_CLOSED)) |