This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In Perl_filter_del(), no need to NULL IoANY(datasv).
authorNicholas Clark <nick@ccl4.org>
Tue, 29 Jun 2010 21:15:45 +0000 (22:15 +0100)
committerNicholas Clark <nick@ccl4.org>
Wed, 30 Jun 2010 08:11:17 +0000 (09:11 +0100)
Perl_sv_clear() understands the IOf_FAKE_DIRP flag, and when set won't treat
IoANY() as a a pointer to a directory handle that needs closing.

toke.c

diff --git a/toke.c b/toke.c
index 7da7ab9..ac00450 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3757,8 +3757,6 @@ Perl_filter_del(pTHX_ filter_t funcp)
     /* if filter is on top of stack (usual case) just pop it off */
     datasv = FILTER_DATA(AvFILLp(PL_rsfp_filters));
     if (IoANY(datasv) == FPTR2DPTR(void *, funcp)) {
-       IoFLAGS(datasv) &= ~IOf_FAKE_DIRP;
-       IoANY(datasv) = (void *)NULL;
        sv_free(av_pop(PL_rsfp_filters));
 
         return;