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.274 2008/05/28 16:59:43 grubba Exp $ + || $Id: encode.c,v 1.275 2008/05/30 15:19:02 mast 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:491:    if (X_->type == T_PROGRAM) { \    dump_program_tables(X_->u.program, 2); \    } \    Pike_fatal("encode_value2() failed %p != %p!\n", \    Pike_sp, _); \    } \    } while(0)   #endif      { -  static struct svalue dested = { -  T_INT, NUMBER_DESTRUCTED, - #ifdef HAVE_UNION_INIT -  {0}, /* Only to avoid warnings. */ - #endif -  }; +  static struct svalue dested = SVALUE_INIT (T_INT, NUMBER_DESTRUCTED, 0);    INT32 i;    struct svalue *tmp;    struct svalue entry_id;      #ifdef ENCODE_DEBUG    data->depth += 2;   #endif       if((val->type == T_OBJECT ||    (val->type==T_FUNCTION && val->subtype!=FUNCTION_BUILTIN)) &&
pike.git/src/encode.c:4893:    ONERROR err;       /* Attempt to avoid infinite recursion on circular structures. */    for (data = current_decode; data; data=data->next) {    if (data->raw == tmp && data->codec == codec   #ifdef PIKE_THREADS    && data->thread_state == Pike_interpreter.thread_state   #endif    ) {    struct svalue *res; -  struct svalue val = { -  T_INT, NUMBER_NUMBER, - #ifdef HAVE_UNION_INIT -  {0}, /* Only to avoid warnings. */ - #endif /* HAVE_UNION_INIT */ -  }; +  struct svalue val = SVALUE_INIT_INT (0);    val.u.integer = COUNTER_START;    if ((res = low_mapping_lookup(data->decoded, &val))) {    push_svalue(res);    return 1;    }    /* Possible recursion detected. */    /* return 0; */    }    }