This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Attempt at making IO::Handle backwards compatible again
[perl5.git] / av.c
diff --git a/av.c b/av.c
index df35b1a..5f9c092 100644 (file)
--- a/av.c
+++ b/av.c
@@ -244,7 +244,7 @@ Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval)
     }
     else if (AvREIFY(av)
             && (!AvARRAY(av)[key]      /* eg. @_ could have freed elts */
-                || SvTYPE(AvARRAY(av)[key]) == SVTYPEMASK)) {
+                || SvIS_FREED(AvARRAY(av)[key]))) {
        AvARRAY(av)[key] = &PL_sv_undef;        /* 1/2 reify */
        goto emptyness;
     }