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.58 1999/11/23 10:38:15 mast Exp $"); + RCSID("$Id: array.c,v 1.59 1999/12/10 22:38:26 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:184:    break;       case T_STRING:    {    check_stack(4);    ref_push_array(a);    assign_svalue_no_free(sp++,ind);    f_column(2);    s[0]=sp[-1];    sp--; +  dmalloc_touch_svalue(sp);    break;    }       default:    {    struct svalue tmp;    tmp.type=T_ARRAY;    tmp.u.array=a;    index_error(0,0,0,&tmp,ind,"Array index is neither int nor string.\n");    }
pike.git/src/array.c:1524:   }      struct array *aggregate_array(INT32 args)   {    struct array *a;       a=allocate_array_no_init(args,0);    MEMCPY((char *)ITEM(a),(char *)(sp-args),args*sizeof(struct svalue));    a->type_field=BIT_MIXED;    sp-=args; +  DO_IF_DMALLOC(while(args--) dmalloc_touch_svalue(sp + args));    return a;   }      struct array *append_array(struct array *a, struct svalue *s)   {    a=resize_array(a,a->size+1);    array_set_index(a, a->size-1, s);    return a;   }