pike.git / src / modules / Image / layers.c

version» Context lines:

pike.git/src/modules/Image/layers.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: layers.c,v 1.99 2006/03/08 01:22:01 peter Exp $ + || $Id: layers.c,v 1.100 2008/01/16 19:42:57 grubba Exp $   */      /*   **! module Image   **! class Layer   **! see also: layers   */      #include "global.h"   
pike.git/src/modules/Image/layers.c:2931:       layers=(a=Pike_sp[-args].u.array)->size;       if (!layers) /* dummy return empty layer */    {    pop_n_elems(args);    push_object(clone_object(image_layer_program,0));    return;    }    -  l=(struct layer**)xalloc(sizeof(struct layer)*layers); +  l=(struct layer**)xalloc(sizeof(struct layer *)*layers);       SET_ONERROR(err, free, l);       for (i=j=0; i<layers; i++)    {    if (a->item[i].type==T_OBJECT)    {    if (!(l[j]=(struct layer*)get_storage(a->item[i].u.object,    image_layer_program)))    SIMPLE_BAD_ARG_ERROR("Image.lay",1,