pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:23:   #include "pike_security.h"   #include "stuff.h"   #include "bignum.h"   #include "cyclic.h"   #include "multiset.h"   #include "mapping.h"      /** The empty array. */   PMOD_EXPORT struct array empty_array=   { -  PIKE_CONSTANT_MEMOBJ_INIT(1), /* Never free */ +  PIKE_CONSTANT_MEMOBJ_INIT(1, PIKE_T_ARRAY), /* Never free */    &weak_empty_array, /* Next */    0, /* previous */    0, /* Size = 0 */    0, /* malloced Size = 0 */    0, /* no types */    0, /* no flags */    empty_array.real_item, /* Initialize the item pointer. */    {SVALUE_INIT_FREE},   };      /** The empty weak array. */   PMOD_EXPORT struct array weak_empty_array=   { -  PIKE_CONSTANT_MEMOBJ_INIT(1), +  PIKE_CONSTANT_MEMOBJ_INIT(1, PIKE_T_ARRAY),    0, &empty_array, 0, 0, 0, ARRAY_WEAK_FLAG,    weak_empty_array.real_item,    {SVALUE_INIT_FREE},   };      struct array *first_array = &empty_array;   struct array *gc_internal_array = 0;   static struct array *gc_mark_array_pos;      #ifdef TRACE_UNFINISHED_TYPE_FIELDS
pike.git/src/array.c:105:    if (size+extra_space)    /* for now, we don't know what will go in here */    v->type_field = BIT_MIXED | BIT_UNFINISHED;    else    v->type_field = 0;    v->flags=0;       v->malloced_size = DO_NOT_WARN((INT32)(size + extra_space));    v->item=v->real_item;    v->size = DO_NOT_WARN((INT32)size); -  INIT_PIKE_MEMOBJ(v); +  INIT_PIKE_MEMOBJ(v, T_ARRAY);    DOUBLELINK (first_array, v);       {    struct svalue *item = ITEM(v);    struct svalue *item_end = item + v->size;    while (item < item_end)    *item++ = svalue_int_zero;    }       return v;