pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.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: encode.c,v 1.276 2008/05/31 19:41:16 grubba Exp $ + || $Id: encode.c,v 1.277 2008/06/09 13:36:04 grubba Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "interpret.h"   #include "svalue.h"   #include "mapping.h"
pike.git/src/encode.c:2939:    if(!data->codec)    decode_error(Pike_sp - 1, NULL,    "Cannot decode object without codec.\n");       fun = find_identifier("decode_object", data->codec->prog);    if (fun < 0)    decode_error(Pike_sp - 1, NULL,    "Cannot decode objects without a "    "\"decode_object\" function in the codec.\n");    apply_low(data->codec,fun,2); -  if ((Pike_sp[-1].type == T_ARRAY) && +  if ((Pike_sp[-1].type == T_ARRAY) && o->prog &&    ((fun = FIND_LFUN(o->prog, LFUN_CREATE)) != -1)) {    /* Call lfun::create(@args). */    INT32 args;    Pike_sp--;    args = Pike_sp->u.array->size;    if (args) {    /* Note: Eats reference */    push_array_items(Pike_sp->u.array);    } else {    free_array(Pike_sp->u.array);