pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:376: Inside #if defined(DEBUG)
   if(start<0)    fatal("Start of find_index is less than zero.\n");   #endif       check_destructed(s);       /* Why search for something that is not there? */   #ifdef DEBUG    if(d_flag > 1) array_check_type_field(v);   #endif -  +     if(v->type_field & (1 << s->type))    { -  TYPE_FIELD t=0; +  if(start) +  {    for(e=start;e<v->size;e++) -  +  if(is_eq(ITEM(v)+e,s)) return e; +  }else{ +  TYPE_FIELD t=0; +  for(e=0;e<v->size;e++)    {    if(is_eq(ITEM(v)+e,s)) return e;    t |= 1<<ITEM(v)[e].type;    }    v->type_field=t; -  return -1; +     } -  +  }    return -1;   }      /*    * Slice a pice of an array (nondestructively)    * return an array consisting of v[start..end-1]    */   struct array *slice_array(struct array *v,INT32 start,INT32 end)   {    struct array *a;