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.191 2008/02/27 10:23:18 grubba Exp $ + || $Id: encode.c,v 1.192 2008/02/29 14:28:29 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:25:   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"   #include "pikecode.h"   #include "pike_types.h"   #include "opcodes.h"   #include "peep.h"    - RCSID("$Id: encode.c,v 1.191 2008/02/27 10:23:18 grubba Exp $"); + RCSID("$Id: encode.c,v 1.192 2008/02/29 14:28:29 grubba Exp $");      /* #define ENCODE_DEBUG */      /* Use the old encoding method for programs. */   /* #define OLD_PIKE_ENCODE_PROGRAM */      #ifdef ENCODE_DEBUG   /* Pass a nonzero integer as the third arg to encode_value,    * encode_value_canonic and decode_value to activate this debug. */   #define EDB(N,X) do { debug_malloc_touch(data); if (data->debug>=N) {X;} } while (0)
pike.git/src/encode.c:2683:    case 3:    pop_stack();    decode_value2(data);    break;       default:    Pike_error("Object coding not compatible.\n");    break;    }    -  if(Pike_sp[-1].type != T_OBJECT && data->pickyness) +  if((Pike_sp[-1].type != T_OBJECT) && data->pickyness) { +  if (num != 2) {    decode_error(NULL, Pike_sp - 1, "Failed to decode object. Got: "); -  +  } else if (Pike_sp[-1].type != PIKE_T_INT) { +  decode_error(NULL, Pike_sp - 1, "Failed to decode bignum. Got: "); +  } +  }       break;    }       case TAG_FUNCTION:    decode_value2(data);       switch(num)    {    case 0: