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.218 2008/02/06 19:17:14 mast Exp $ + || $Id: encode.c,v 1.219 2008/02/27 10:22:59 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.218 2008/02/06 19:17:14 mast Exp $"); + RCSID("$Id: encode.c,v 1.219 2008/02/27 10:22:59 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:553:    /* But that's a feature; NUMBER_UNDEFINED is an inherently    * transient value. It would lose its usefulness otherwise.    * /mast */      #if SIZEOF_INT_TYPE > 4    {    INT_TYPE i=val->u.integer;    if (i != (INT32)i)    {   #ifdef AUTO_BIGNUM +  /* Reuse the id. */ +  data->counter.u.integer--; +  /* Make sure we don't find ourselves again below... */ +  map_delete(data->encoded, val); +  +  /* Encode as a bignum */    push_int(i);    convert_stack_top_to_bignum();    encode_value2(Pike_sp-1,data, 0);    pop_stack(); -  +  +  /* Restore the entry we removed above. */ +  mapping_insert(data->encoded, val, &entry_id);   #else    Pike_error ("Cannot encode integers with more than 32 bits "    "without bignum support.\n");   #endif    goto encode_done;    }    else    code_entry(TAG_INT, i,data);    }   #else