diff options
Diffstat (limited to 'av.c')
-rw-r--r-- | av.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -15,15 +15,15 @@ #include "EXTERN.h" #include "perl.h" -static void av_reify _((AV* av)); - -static void +void av_reify(av) AV* av; { I32 key; SV* sv; - + + if (AvREAL(av)) + return; key = AvMAX(av) + 1; while (key > AvFILL(av) + 1) AvARRAY(av)[--key] = &sv_undef; @@ -324,6 +324,9 @@ register AV *av; SvPVX(av) = (char*)AvALLOC(av); } AvFILL(av) = -1; + + if (SvRMAGICAL(av)) + mg_clear((SV*)av); } void |