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.64 2000/04/12 18:40:12 hubbe Exp $"); + RCSID("$Id: array.c,v 1.65 2000/04/17 16:48:57 grubba Exp $");      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:1852:       a=&empty_array;    do    {    if(gc_do_free(a))    {    add_ref(a);    free_svalues(ITEM(a), a->size, a->type_field);    a->size=0;    -  if(!(next=a->next)) -  fatal("Null pointer in array list.\n"); +  SET_NEXT_AND_FREE(a, free_array);    -  free_array(a); -  a=next; +  if (!(a = next)) +  fatal("Null pointer in array list.\n");    }    else if(a->flags & ARRAY_WEAK_FLAG)    {    int e;    add_ref(a);       if(a->flags & ARRAY_WEAK_SHRINK)    {    int d=0;    for(e=0;e<a->size;e++)
pike.git/src/array.c:1894:    {    free_svalue(a->item+e);    a->item[e].type=T_INT;    a->item[e].u.integer=0;    a->item[e].subtype=NUMBER_DESTRUCTED;    a->type_field |= BIT_INT;    }    }    }    -  if(!(next=a->next)) -  fatal("Null pointer in array list.\n"); +  SET_NEXT_AND_FREE(a, free_array);    -  free_array(a); -  a=next; +  if (!(a = next)) +  fatal("Null pointer in array list.\n");    }    else    {   #ifdef PIKE_DEBUG    if(d_flag) gc_check_array(a);   #endif    a=a->next;    }    } while (a != & empty_array);   }