summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@covalent.net>2001-05-27 06:47:13 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-28 15:28:55 +0000
commit9a6404c542f0e44e829f8d8091fc173931864343 (patch)
tree9526d0a5dbeb3f545c5f34c1145df685ce0df9ac /perlio.c
parent2172ddaf68883944687b5a1399a481898682b504 (diff)
downloadperl-9a6404c542f0e44e829f8d8091fc173931864343.tar.gz
Re: perlio + multiple perl_alloc..destruct
Message-ID: <Pine.LNX.4.21.0105271340370.5938-100000@mako.covalent.net> p4raw-id: //depot/perl@10255
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index 5a9ce2ce4a..b64524acef 100644
--- 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