pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:1:   /*   || 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.132 2002/10/11 01:39:28 nilsson Exp $ + || $Id: array.c,v 1.133 2002/12/01 00:16:54 mast Exp $   */      #include "global.h"   #include "svalue.h"   #include "array.h"   #include "object.h"   #include "las.h"   #include "stralloc.h"   #include "interpret.h"   #include "opcodes.h"
pike.git/src/array.c:18:   #include "fsort.h"   #include "builtin_functions.h"   #include "pike_memory.h"   #include "gc.h"   #include "main.h"   #include "security.h"   #include "stuff.h"   #include "bignum.h"   #include "cyclic.h"    - RCSID("$Id: array.c,v 1.132 2002/10/11 01:39:28 nilsson Exp $"); + RCSID("$Id: array.c,v 1.133 2002/12/01 00:16:54 mast Exp $");      PMOD_EXPORT struct array empty_array=   {    PIKE_CONSTANT_MEMOBJ_INIT(1), /* Never free */    &weak_empty_array, /* Next */    &weak_shrink_empty_array, /* previous (circular) */    0, /* Size = 0 */    0, /* malloced Size = 0 */    0, /* no types */    0, /* no flags */
pike.git/src/array.c:121:   }      /*    * Free an array, call this when the array has zero references    */   PMOD_EXPORT void really_free_array(struct array *v)   {   #ifdef PIKE_DEBUG    if(v == & empty_array || v == &weak_empty_array || v == &weak_shrink_empty_array)    Pike_fatal("Tried to free some *_empty_array.\n"); -  if (v->refs) +  if (v->refs) { + #ifdef DEBUG_MALLOC +  describe_something(v, T_ARRAY, 0,2,0, NULL); + #endif    Pike_fatal("Freeing array with %d refs.\n", v->refs); -  +  }   #endif      #ifdef PIKE_DEBUG    if(d_flag > 1) array_check_type_field(v);   #endif       add_ref(v);    EXIT_PIKE_MEMOBJ(v);    free_svalues(ITEM(v), v->size, v->type_field);    v->refs--;