pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:20:   #include "main.h"      struct array empty_array=   {    1, /* Never free */    &empty_array, /* Next */    &empty_array, /* previous (circular) */    0, /* Size = 0 */    0, /* malloced Size = 0 */    0, /* no types */ +  0, /* no flags */   };            /* Allocate an array, this might be changed in the future to    * allocate linked lists or something    * NOTE: the new array have zero references    */      struct array *low_allocate_array(INT32 size,INT32 extra_space)
pike.git/src/array.c:136: Inside #if defined(DEBUG)
  #ifdef DEBUG    if(index<0 || index>=v->size)    fatal("Illegal index in low level index routine.\n");   #endif       v->refs++;    assign_svalue(s, ITEM(v) + index);    free_array(v);   }    -  - void simple_array_index_no_free(struct svalue *s,struct array *a,struct svalue *ind) + void simple_array_index_no_free(struct svalue *s, +  struct array *a,struct svalue *ind)   {    INT32 i;    switch(ind->type)    {    case T_INT:    i=ind->u.integer;    if(i<0) i+=a->size;    if(i<0 || i>=a->size) error("Index out of range.\n");    array_index_no_free(s,a,i);    break;