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.141 2002/05/02 16:32:13 mast Exp $"); + RCSID("$Id: encode.c,v 1.142 2002/05/09 15:33:31 mast Exp $");      /* #define ENCODE_DEBUG */      #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)   #else   #define EDB(N,X) do { debug_malloc_touch(data); } while (0)   #endif
pike.git/src/encode.c:2159:    Pike_error("Failed to decode function.\n");    break;          case TAG_PROGRAM:    switch(num)    {    case 0:    {    struct svalue *prog_code; +  struct program *p;       tmp=data->counter;    data->counter.u.integer++;    decode_value2(data);       /* Keep the value so that we can make a good error-message. */    prog_code = Pike_sp-1;    stack_dup();       if(data->codec)    {    apply(data->codec,"programof", 1);    }else{    fallback_codec();    } -  if(data->pickyness && !program_from_svalue(Pike_sp-1)) { +  +  p = program_from_svalue(Pike_sp-1); +  +  if(data->pickyness && !p) {    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");    }    /* Remove the extra entry from the stack. */    stack_swap();    pop_stack(); -  +  ref_push_program(p); +  stack_swap(); +  pop_stack();    break;    }    case 1:    {    int d, in;    size_t size=0;    char *dat=0;    struct program *p;    struct object *placeholder=0;    ONERROR err1, err2, err3, err4;