pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:19:   #include "operators.h"   #include "builtin_functions.h"   #include "module_support.h"   #include "fsort.h"   #include "threads.h"   #include "stuff.h"   #include "version.h"   #include "bignum.h"   #include "pikecode.h"    - RCSID("$Id: encode.c,v 1.149 2002/06/25 14:26:40 grubba Exp $"); + RCSID("$Id: encode.c,v 1.150 2002/08/06 13:50:54 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:2397:       if(data->codec)    {    apply(data->codec,"programof", 1);    }else{    fallback_codec();    }       p = program_from_svalue(Pike_sp-1);    -  if(data->pickyness && !p) { +  if (!p) { +  if(data->pickyness) {    if ((prog_code->type == T_STRING) &&    (prog_code->u.string->len < 128) &&    (!prog_code->u.string->size_shift)) {    Pike_error("Failed to decode program \"%s\".\n",    prog_code->u.string->str);    }    Pike_error("Failed to decode program.\n");    } -  +  pop_n_elems(2); +  push_undefined(); +  break; +  }    /* Remove the extra entry from the stack. */ -  stack_swap(); -  pop_stack(); +     ref_push_program(p); -  stack_swap(); -  pop_stack(); +  stack_pop_n_elems_keep_top(2);    break;    }       case 1:    {    int d, in;    size_t size=0;    char *dat=0;    struct program *p;    struct object *placeholder=0;