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.84 2000/08/16 15:54:07 grubba Exp $"); + RCSID("$Id: array.c,v 1.85 2000/08/16 21:39:07 mast Exp $");      PMOD_EXPORT struct array empty_array=   {    1, /* Never free */   #ifdef PIKE_SECURITY    0,   #endif    &empty_array, /* Next */    &empty_array, /* previous (circular) */    0, /* Size = 0 */
pike.git/src/array.c:1804:    int e;    TYPE_FIELD t;      #ifdef PIKE_DEBUG    if(!(a->flags & ARRAY_WEAK_FLAG))    fatal("Array is not weak.\n");   #endif       if(a->flags & ARRAY_WEAK_SHRINK) {    int d=0; + #ifdef PIKE_DEBUG +  if (a->refs != 1) +  fatal("Got %d refs to weak shrink array " +  "which we'd like to change the size on.\n", a->refs); + #endif    t = 0;    for(e=0;e<a->size;e++)    if (!recurse_fn(a->item+e, 1)) {    a->item[d++]=a->item[e];    t |= 1 << a->item[e].type;    }    a->size=d;    }    else    if (!(t = recurse_fn(a->item, a->size)))