pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:16:   #include "pike_types.h"   #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"    - RCSID("$Id: array.c,v 1.121 2001/12/16 02:49:36 mast Exp $"); + RCSID("$Id: array.c,v 1.122 2001/12/16 20:28:08 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:119:   }      /*    * 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)    fatal("Tried to free some *_empty_array.\n"); +  if (v->refs) +  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--;