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.283 2008/06/29 12:50:03 nilsson Exp $ + || $Id: encode.c,v 1.284 2008/07/31 10:29:56 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:2488:       if (decoding) {    push_constant_text ("Error while decoding "); n++;    push_constant_text ("%O");    push_svalue (decoding);    f_sprintf (2); n++;    push_constant_text (":\n"); n++;    }    push_text (buf); n++;    if (other) { -  push_constant_text ("%O\n"); +  push_constant_text ("%O (%t)\n");    push_svalue (other); -  f_sprintf (2); n++; +  push_text(get_name_of_type(other->type)); +  f_sprintf (3); n++;    }    f_add (n);       f_backtrace (0);    f_aggregate (2);       free_svalue(& throw_value);    dmalloc_touch_svalue(Pike_sp-1);    throw_value = *--Pike_sp;    throw_severity = THROW_ERROR;
pike.git/src/encode.c:3010:    } 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); +  stack_dup(); /* For diagnostic purposes... */       switch(num)    {    case 0:    apply(data->codec,"functionof", 1);    break;       case 1: {    struct program *p;    if(Pike_sp[-1].type != T_OBJECT && data->pickyness)
pike.git/src/encode.c:3068:    pop_stack();    break;    }       default:    Pike_error("Function coding not compatible.\n");    break;    }       if(Pike_sp[-1].type != T_FUNCTION && data->pickyness) -  decode_error(NULL, Pike_sp - 1, "Failed to decode function. Got: "); +  decode_error(Pike_sp - 2, Pike_sp - 1, +  "Failed to decode function. Got: ");    -  +  stack_pop_keep_top(); +     break;          case TAG_PROGRAM:    EDB(3,    fprintf(stderr, "%*s TAG_PROGRAM(%d)\n",    data->depth, "", num));    switch(num)    {    case 0: