diff --git a/src/mapping.c b/src/mapping.c index 8d6c60adac888683e2221475449adcceba3c990f..081cf6517dae6b41a7d0c9f7c9028531dc8d61e9 100644 --- a/src/mapping.c +++ b/src/mapping.c @@ -5,7 +5,7 @@ \*/ /**/ #include "global.h" -RCSID("$Id: mapping.c,v 1.125 2001/06/26 21:03:50 hubbe Exp $"); +RCSID("$Id: mapping.c,v 1.126 2001/06/27 00:01:31 mast Exp $"); #include "main.h" #include "object.h" #include "mapping.h" @@ -2262,7 +2262,6 @@ unsigned gc_touch_all_mappings(void) fatal("Error in mapping link list.\n"); for (m = first_mapping; m; m = m->next) { debug_gc_touch(m); - debug_gc_touch(m->data); n++; if (m->next && m->next->prev != m) fatal("Error in mapping link list.\n"); diff --git a/src/testsuite.in b/src/testsuite.in index 507c5162e441308b8efb0400a09d695665eec712..5ad488f063036d4601a709ce3af9151d07a56402 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,4 +1,4 @@ -test_true([["$Id: testsuite.in,v 1.427 2001/06/23 10:33:11 hubbe Exp $"]]); +test_true([["$Id: testsuite.in,v 1.428 2001/06/27 00:01:32 mast Exp $"]]); cond([[all_constants()->_verify_internals]], [[ @@ -3825,6 +3825,84 @@ ifefun(gc, gc(); return sizeof (m); ]], 1) + + test_any([[ + return class { + mapping x; + int test() + { + object o = class { + mapping a = ([1: this_object()]); + void destroy() {x = a;} + }(); + o = 0; + gc(); + return x && !x[1]; + } + }()->test(); + ]], 1) + test_any([[ + return class { + multiset x; + int test() + { + object o = class { + multiset a = (<this_object()>); + void destroy() {x = a;} + }(); + o = 0; + gc(); + return x && !sizeof (x + (<>)); + } + }()->test(); + ]], 1) + test_any([[ + return class { + array x; + int test() + { + object o = class { + array a = ({this_object()}); + void destroy() {x = a;} + }(); + o = 0; + gc(); + return x && !x[0]; + } + }()->test(); + ]], 1) + test_any([[ + return class { + class Obj (object o) {void destroy() {}} + Obj x; + int test() + { + object o = class { + Obj a = Obj (this_object()); + void destroy() {x = a;} + }(); + o = 0; + gc(); + return !x; + } + }()->test(); + ]], 1) + test_any([[ + return class { + class Obj (object o) {} + Obj x; + int test() + { + object o = class { + Obj a = Obj (this_object()); + void destroy() {x = a;} + }(); + o = 0; + gc(); + return x && !x->o; + } + }()->test(); + ]], 1) ]]) cond([[ sizeof( cpp("__AUTO_BIGNUM__")/"__AUTO_BIGNUM__" ) == 1 ]],