Branch: Tag:

2004-03-15

2004-03-15 22:47:15 by Martin Stjernholm <mast@lysator.liu.se>

Use the gc to get a good destruct order when DO_PIKE_CLEANUP is used. This
should avoid bogus errors from destroy functions in that case.

Rev: src/array.c:1.155
Rev: src/gc.c:1.242
Rev: src/gc.h:1.106
Rev: src/main.c:1.192
Rev: src/object.c:1.251
Rev: src/object.h:1.81

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: array.c,v 1.154 2004/03/15 22:23:14 mast Exp $ + || $Id: array.c,v 1.155 2004/03/15 22:47:15 mast Exp $   */      #include "global.h"
26:   #include "cyclic.h"   #include "multiset.h"    - RCSID("$Id: array.c,v 1.154 2004/03/15 22:23:14 mast Exp $"); + RCSID("$Id: array.c,v 1.155 2004/03/15 22:47:15 mast Exp $");      PMOD_EXPORT struct array empty_array=   {
2350:   {    GC_CYCLE_ENTER(a, T_ARRAY, weak) {   #ifdef PIKE_DEBUG -  if (a == &empty_array || a == &weak_empty_array || a == &weak_shrink_empty_array) +  if (!gc_destruct_everything && +  (a == &empty_array || a == &weak_empty_array || a == &weak_shrink_empty_array))    Pike_fatal("Trying to gc cycle check some *_empty_array.\n");   #endif