This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: perlio + multiple perl_alloc..destruct
authorDoug MacEachern <dougm@covalent.net>
Sun, 27 May 2001 13:47:13 +0000 (06:47 -0700)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 28 May 2001 15:28:55 +0000 (15:28 +0000)
Message-ID: <Pine.LNX.4.21.0105271340370.5938-100000@mako.covalent.net>

p4raw-id: //depot/perl@10255

perlio.c

index 5a9ce2c..b64524a 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -311,6 +311,13 @@ HV *PerlIO_layer_hv;
 AV *PerlIO_layer_av;
 
 void
+PerlIO_cleanup_layers(pTHXo_ void *data)
+{
+ PerlIO_layer_hv = Nullhv;
+ PerlIO_layer_av = Nullav;
+}
+
+void
 PerlIO_cleanup()
 {
  dTHX;
@@ -3596,6 +3603,8 @@ PerlIO_funcs PerlIO_mmap = {
 void
 PerlIO_init(void)
 {
+ dTHX;
+ call_atexit(PerlIO_cleanup_layers, NULL);
  if (!_perlio)
   {
 #ifndef WIN32