pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: array.c,v 1.226 2009/11/28 13:36:20 mast Exp $ + || $Id: array.c,v 1.227 2010/07/01 09:16:05 grubba Exp $   */      #include "global.h"   #include "svalue.h"   #include "array.h"   #include "object.h"   #include "las.h"   #include "stralloc.h"   #include "interpret.h"   #include "opcodes.h"
pike.git/src/array.c:109:    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);    DOUBLELINK (first_array, v);    -  for(e=0;e<v->size;e++) -  { -  ITEM(v)[e].type=T_INT; -  ITEM(v)[e].subtype=NUMBER_NUMBER; -  ITEM(v)[e].u.integer=0; +  MEMSET(v->real_item, 0, sizeof(struct svalue) * size); +  for(e=0;e<size;e++) { +  v->item[e].type=T_INT;    }       return v;   }      /**    * Free an array without freeing the values inside it.    * Any values inside of the array will be kept.    * @param v The array to be freed.    */