pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:2289:    return a;   }      /** Add an element to the end of an array by resizing the array.    *    * @param a the array to be appended    * @param s the value to be added to the new element in the array    */   PMOD_EXPORT 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); +  INT32 size = a->size; +  a=resize_array(a, size+1); +  array_set_index(a, size, s);    return a;   }      typedef char *(* explode_searchfunc)(void *,void *,size_t);      /** Explode a string into an array by a delimiter.    *    * @param str the string to be split    * @param del the string to split str by    * @returns an array containing the elements of the split string