tiearray tweaks
authorNick Ing-Simmons <nik@tiuk.ti.com>
Tue, 13 Jan 1998 22:55:02 +0000 (22:55 +0000)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Tue, 13 Jan 1998 22:55:02 +0000 (22:55 +0000)
p4raw-id: //depot/ansiperl@420

av.c
pp_sys.c
t/op/nothread.t [changed mode: 0644->0755]
t/op/tiearray.t [changed mode: 0644->0755]

diff --git a/av.c b/av.c
index 45d4628..e715d10 100644 (file)
--- a/av.c
+++ b/av.c
@@ -364,6 +364,7 @@ av_undef(register AV *av)
            SvREFCNT_dec(AvARRAY(av)[--key]);
     }
     Safefree(AvALLOC(av));
+    AvARRAY(av) = 0;
     AvALLOC(av) = 0;
     SvPVX(av) = 0;
     AvMAX(av) = AvFILLp(av) = -1;
index 26886d1..85ac711 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -565,7 +565,13 @@ PP(pp_tie)
     sv = TOPs;
     if (sv_isobject(sv)) {
        if (SvTYPE(varsv) == SVt_PVHV || SvTYPE(varsv) == SVt_PVAV) {
-           sv_unmagic(varsv, 'P');
+           sv_unmagic(varsv, 'P');            
+#ifdef DEBUGGING
+       if (SvTYPE(varsv) == SVt_PVAV) {
+           AV *av = (AV *) varsv; 
+           av_undef(av);
+       }
+#endif
            sv_magic(varsv, sv, 'P', Nullch, 0);
        }
        else {
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 028fe40..045891d
@@ -174,9 +174,7 @@ print "ok ", $test++,"\n";
 print "not " unless join(':',@ary) eq '1:2:3';
 print "ok ", $test++,"\n";         
 
-untie @ary;   
-
-exit;
+# untie @ary;   
 
 }