summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-16 11:09:25 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-10-16 11:09:25 +0000
commitd58bf5aa3d3631a46847733b1ff1985b30140228 (patch)
tree406c095d697ae0ae82bbf187e5c65151bd41232a /av.c
parentc7848ba184fac8eca4125f4296d6e09fee2c1846 (diff)
parent50e27ac33704d6fb34d4be7cfb426b2097b27505 (diff)
downloadperl-d58bf5aa3d3631a46847733b1ff1985b30140228.tar.gz
Merge maint-5.004 branch (5.004_04) with mainline.
p4raw-id: //depot/perl@137
Diffstat (limited to 'av.c')
-rw-r--r--av.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/av.c b/av.c
index b583f7ed6d..933e6559c3 100644
--- a/av.c
+++ b/av.c
@@ -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;
@@ -327,6 +327,9 @@ register AV *av;
SvPVX(av) = (char*)AvALLOC(av);
}
AvFILL(av) = -1;
+
+ if (SvRMAGICAL(av))
+ mg_clear((SV*)av);
}
void