pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:99:    GC_ALLOC(v);          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->malloced_size = (INT32)(size + extra_space);    v->item=v->real_item; -  v->size = DO_NOT_WARN((INT32)size); +  v->size = (INT32)size;    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;    }   
pike.git/src/array.c:610:    for(;a->size < size; a->size++)    {    SET_SVAL(ITEM(a)[a->size], T_INT, NUMBER_NUMBER, integer, 0);    }    a->type_field |= BIT_INT;    return a;    } else {    struct array *ret;    ret = array_set_flags(low_allocate_array(size, size + 1), a->flags);    memcpy(ITEM(ret), ITEM(a), sizeof(struct svalue)*a->size); -  ret->type_field = DO_NOT_WARN((TYPE_FIELD)(a->type_field | BIT_INT)); +  ret->type_field = (TYPE_FIELD)(a->type_field | BIT_INT);    a->size=0;    free_array(a);    return ret;    }    } else {    return array_shrink(a, size);    }   }      /**
pike.git/src/array.c:1140:    if(a->u.integer < b->u.integer) return -1;    if(a->u.integer > b->u.integer) return 1;    return 0;       case T_FLOAT:    if(a->u.float_number < b->u.float_number) return -1;    if(a->u.float_number > b->u.float_number) return 1;    return 0;       case T_STRING: -  return DO_NOT_WARN((int)my_quick_strcmp(a->u.string, b->u.string)); +  return (int)my_quick_strcmp(a->u.string, b->u.string);       case T_OBJECT:    case T_FUNCTION:    return obj_or_func_cmp (a, b);       default:    if(a->u.refs < b->u.refs) return -1;    if(a->u.refs > b->u.refs) return 1;    return 0;    }
pike.git/src/array.c:1177:    if(a->u.integer < b->u.integer) return -1;    if(a->u.integer > b->u.integer) return 1;    return 0;       case T_FLOAT:    if(a->u.float_number < b->u.float_number) return -1;    if(a->u.float_number > b->u.float_number) return 1;    return 0;       case T_STRING: -  return DO_NOT_WARN((int)my_quick_strcmp(a->u.string, b->u.string)); +  return (int)my_quick_strcmp(a->u.string, b->u.string);       case T_ARRAY:    if(a==b) return 0;    if (!a->u.array->size)    if (!b->u.array->size) /* There are several different empty arrays. */    return 0;    else    return -1;    else    if (!b->u.array->size)
pike.git/src/array.c:1606:       if(i & PIKE_ARRAY_OP_A) *(ptr++)=ap;    if(i & PIKE_ARRAY_OP_B) *(ptr++)=~bp;    if(i & PIKE_ARRAY_OP_SKIP_A) ap++;    if(i & PIKE_ARRAY_OP_SKIP_B) bp++;    }       if((opcode >> 8) & PIKE_ARRAY_OP_A) while(ap<a->size) *(ptr++)=ap++;    if(opcode & PIKE_ARRAY_OP_B) while(bp<b->size) *(ptr++)=~(bp++);    -  *ret = DO_NOT_WARN((INT32)(ptr-ret-1)); +  *ret = (INT32)(ptr-ret-1);       UNSET_ONERROR(r);       return ret;   }      /**    * This routine merges two arrays in the order specified by 'zipper'    * zipper normally produced by merge() above.    */
pike.git/src/array.c:2567:   PMOD_EXPORT void apply_array(struct array *a, INT32 args, int flags)   {    INT32 e, hash = 0;    struct svalue *argp = Pike_sp-args;    struct array *cycl;    DECLARE_CYCLIC();       check_stack(args);    check_array_for_destruct(a);    for (e=0; e<args; e++) -  hash = hash * 33 + DO_NOT_WARN ((INT32) PTR_TO_INT (Pike_sp[-e-1].u.ptr)); +  hash = hash * 33 + (INT32) PTR_TO_INT (Pike_sp[-e-1].u.ptr);       if (!(cycl = (struct array *)BEGIN_CYCLIC(a, (ptrdiff_t)hash))) {    TYPE_FIELD new_types = 0;    struct array *aa;    if ((flags & 1) && (a->refs == 1)) {    /* Destructive operation possible. */    add_ref(aa = a);    aa->type_field |= BIT_UNFINISHED;    } else {    aa = allocate_array(a->size);