pike.git / src / encode.c

version» Context lines:

pike.git/src/encode.c:838:    * but that will have to wait until next time. /Hubbe    */    if(is_bignum_object(val->u.object))    {    code_entry(TAG_OBJECT, 2, data);    /* 256 would be better, but then negative numbers    * won't work... /Hubbe    */    push_int(36);    apply(val->u.object,"digits",1); + #ifdef PIKE_DEBUG    if(TYPEOF(Pike_sp[-1]) != T_STRING)    Pike_error("Gmp.mpz->digits did not return a string!\n"); -  + #endif    encode_value2(Pike_sp-1, data, 0);    pop_stack();    break;    }       if (data->canonic)    Pike_error("Canonical encoding of objects not supported.\n");    push_svalue(val);    apply(encoder_codec (data), "nameof", 1);    EDB(5, fprintf(stderr, "%*s->nameof: ", data->depth, "");
pike.git/src/encode.c:1831:    data->delayed = allocate_array (0);    SET_SVAL(data->counter, T_INT, NUMBER_NUMBER, integer, COUNTER_START);      #ifdef ENCODE_DEBUG    data->debug = args > 2 ? Pike_sp[2-args].u.integer : 0;    data->depth = -2;   #endif       if(args > 1 && TYPEOF(Pike_sp[1-args]) == T_OBJECT)    { -  if (SUBTYPEOF(Pike_sp[1-args])) { -  Pike_error("encode_value: " -  "The codec may not be a subtyped object yet.\n"); -  } +  if (SUBTYPEOF(Pike_sp[1-args])) +  Pike_error("The codec may not be a subtyped object yet.\n"); +     data->codec=Pike_sp[1-args].u.object;    add_ref (data->codec);    }else{    data->codec=NULL;    }       SET_ONERROR(tmp, free_encode_data, data);    addstr("\266ke0", 4);       encode_value2(Pike_sp-args, data, 1);
pike.git/src/encode.c:1909:    data->delayed = allocate_array (0);    SET_SVAL(data->counter, T_INT, NUMBER_NUMBER, integer, COUNTER_START);      #ifdef ENCODE_DEBUG    data->debug = args > 2 ? Pike_sp[2-args].u.integer : 0;    data->depth = -2;   #endif       if(args > 1 && TYPEOF(Pike_sp[1-args]) == T_OBJECT)    { -  if (SUBTYPEOF(Pike_sp[1-args])) { -  Pike_error("encode_value_canonic: " -  "The codec may not be a subtyped object yet.\n"); -  } +  if (SUBTYPEOF(Pike_sp[1-args])) +  Pike_error("The codec may not be a subtyped object yet.\n"); +     data->codec=Pike_sp[1-args].u.object;    add_ref (data->codec);    }else{    data->codec=NULL;    }       SET_ONERROR(tmp, free_encode_data, data);    addstr("\266ke0", 4);       encode_value2(Pike_sp-args, data, 1);
pike.git/src/encode.c:1996:    if (data->codec) return data->codec;    MAKE_CONST_STRING (decoder_str, "Decoder");    return data->codec = lookup_codec (decoder_str);   }      static void decode_value2(struct decode_data *data);      static int my_extract_char(struct decode_data *data)   {    if(data->ptr >= data->len) -  Pike_error("Decode error: Not enough data in string.\n"); +  Pike_error("Not enough data in string.\n");    return data->data [ data->ptr++ ];   }      static DECLSPEC(noreturn) void decode_error (    struct decode_data *data, struct svalue *decoding, const char *msg, ...)    ATTRIBUTE((noinline,noreturn));      static DECLSPEC(noreturn) void decode_error (    struct decode_data *data, struct svalue *decoding, const char *msg, ...)   {