pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:18:   #include "pike_error.h"   #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"    - RCSID("$Id: encode.c,v 1.128 2001/09/09 05:19:36 hubbe Exp $"); + RCSID("$Id: encode.c,v 1.129 2001/09/24 14:25:54 grubba 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 if (data->debug>=N) {X;} while (0)   #else   #define EDB(N,X) do {} while (0)   #endif
pike.git/src/encode.c:937:    }    if (data->canonic)    Pike_error("Canonical encoding of programs not supported.\n");    check_stack(1);    push_svalue(val);    apply(data->codec,"nameof", 1);    if(Pike_sp[-1].type == val->type)    Pike_error("Error in master()->nameof(), same type returned.\n");    if(Pike_sp[-1].type == T_INT && Pike_sp[-1].subtype == NUMBER_UNDEFINED)    { -  INT32 e; +     struct program *p=val->u.program;    if( (p->flags & PROGRAM_HAS_C_METHODS) || p->event_handler )    {    if(p->parent)    {    /* We have to remove ourself from the cache for now */    struct svalue tmp=data->counter;    tmp.u.integer--;    map_delete(data->encoded, val);   
pike.git/src/encode.c:1471:   {    /* FIXME: Probably ought to use the tag encodings too. */       int tmp;    ONERROR err1;    ONERROR err2;       SET_ONERROR(err1, restore_type_stack, Pike_compiler->type_stackp);    SET_ONERROR(err2, restore_type_mark, Pike_compiler->pike_type_mark_stackp);    + #ifndef USE_PIKE_TYPE   one_more_type: -  + #endif /* !USE_PIKE_TYPE */    tmp = GETC();    switch(tmp)    {    default:    Pike_error("decode_value(): Error in type string (%d).\n", tmp);    /*NOTREACHED*/    break;       case T_ASSIGN:    tmp = GETC();
pike.git/src/encode.c:1602:    case T_STRING:    case T_MIXED:    case T_ZERO:    case T_VOID:    case PIKE_T_UNKNOWN:    push_type(tmp);    break;       case T_OBJECT:    { -  INT32 x; +     int flag = GETC();       decode_value2(data);    switch(Pike_sp[-1].type)    {    case T_INT:    push_object_type_backwards(flag, Pike_sp[-1].u.integer );    break;       case T_PROGRAM:
pike.git/src/encode.c:1758:       if(!res)    {    DECLARE_INF    DECLARE_NAN       switch(num)    {    case Pike_FP_SNAN: /* Signal Not A Number */    case Pike_FP_QNAN: /* Quiet Not A Number */ -  push_float(MAKE_NAN()); +  push_float(DO_NOT_WARN((FLOAT_TYPE)MAKE_NAN()));    break;       case Pike_FP_NINF: /* Negative infinity */ -  push_float(MAKE_INF(-1)); +  push_float(DO_NOT_WARN((FLOAT_TYPE)MAKE_INF(-1)));    break;       case Pike_FP_PINF: /* Positive infinity */ -  push_float(MAKE_INF(1)); +  push_float(DO_NOT_WARN((FLOAT_TYPE)MAKE_INF(1)));    break;       case Pike_FP_NZERO: /* Negative Zero */    push_float(-0.0); /* Does this do what we want? */    break;       default: -  push_float(LDEXP(res, num)); +  push_float(DO_NOT_WARN((FLOAT_TYPE)LDEXP(res, num)));    break;    }    break;    }    -  push_float(LDEXP(res, num)); +  push_float(DO_NOT_WARN((FLOAT_TYPE)LDEXP(res, num)));    break;    }       case TAG_TYPE:    {    struct pike_type *t;       decode_type(t, data);    check_type_string(t);    push_type_value(t);