Branch: Tag:

2004-05-11

2004-05-11 19:50:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Bugfix.

Rev: src/encode.c:1.183

2:   || 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.182 2004/05/11 15:42:50 grubba Exp $ + || $Id: encode.c,v 1.183 2004/05/11 19:50:40 grubba Exp $   */      #include "global.h"
32:   #include "opcodes.h"   #include "peep.h"    - RCSID("$Id: encode.c,v 1.182 2004/05/11 15:42:50 grubba Exp $"); + RCSID("$Id: encode.c,v 1.183 2004/05/11 19:50:40 grubba Exp $");      /* #define ENCODE_DEBUG */   
1131:    code_number(p->identifiers[d].identifier_flags,data);    code_number(p->identifiers[d].run_time_type,data);    code_number(p->identifiers[d].opt_flags,data); -  if (!(p->identifiers[d].identifier_flags & IDENTIFIER_C_FUNCTION)) { +  if (!IDENTIFIER_IS_C_FUNCTION(p->identifiers[d].identifier_flags)) {    code_number(p->identifiers[d].func.offset,data);    } else {    Pike_error("Cannot encode functions implemented in C "
3108:    decode_number(p->identifiers[d].identifier_flags,data);    decode_number(p->identifiers[d].run_time_type,data);    decode_number(p->identifiers[d].opt_flags,data); -  if (!(p->identifiers[d].identifier_flags & IDENTIFIER_C_FUNCTION)) +  if (!IDENTIFIER_IS_C_FUNCTION(p->identifiers[d].identifier_flags))    {    decode_number(p->identifiers[d].func.offset,data);    } else {
4030:    if (bytecode_method == PIKE_BYTECODE_PORTABLE) {    /* We've regenerated p->program, so these may be off. */    local_num_program = p->num_program; +  local_num_relocations = p->num_relocations;    local_num_linenumbers = p->num_linenumbers;    }   
4423:    }   }    - /*! @decl mixed decode_value(string coded_value, object|void codec) + /*! @decl mixed decode_value(string coded_value, void|Codec codec)    *! -  *! Decode a value from a string. +  *! Decode a value from the string @[coded_value].    *!    *! This function takes a string created with @[encode_value()] or    *! @[encode_value_canonic()] and converts it back to the value that was    *! coded.    *! -  *! If no codec is specified, the current master object will be used as codec. +  *! If @[codec] is specified, it's used as the codec for the decode. +  *! If no codec is specified, the current master object will be used.    *!    *! @seealso    *! @[encode_value()], @[encode_value_canonic()]