Branch: Tag:

2002-05-02

2002-05-02 14:48:10 by Martin Stjernholm <mast@lysator.liu.se>

The third argument to encode_value, encode_value_canonic and decode_value is
only an internal flag used with some debug in encode.c. It should not be
part of the official API. It should be cumbersome to use.

Rev: src/builtin_functions.c:1.426
Rev: src/encode.c:1.140

26:   #include "bignum.h"   #include "pikecode.h"    - RCSID("$Id: encode.c,v 1.139 2002/04/07 19:30:08 mast Exp $"); + RCSID("$Id: encode.c,v 1.140 2002/05/02 14:48:10 mast Exp $");      /* #define ENCODE_DEBUG */   
1166:    free_mapping(data->encoded);   }    - /*! @decl string encode_value(mixed value, object|void codec, int|void trace) + /*! @decl string encode_value(mixed value, object|void codec)    *!    *! Code a value into a string.    *!
1203:    data=&d;       check_all_args("encode_value", args, BIT_MIXED, BIT_VOID | BIT_OBJECT, -  BIT_VOID | BIT_INT, 0); + #ifdef ENCODE_DEBUG +  /* This argument is only an internal debug helper. +  * It's intentionally not part of the function +  * prototype, to keep the argument position free for +  * other uses in the future. */ +  BIT_VOID | BIT_INT, + #endif +  0);       initialize_buf(&data->buf);    data->canonic = 0;
1232:    push_string(low_free_buf(&data->buf));   }    - /*! @decl string encode_value_canonic(mixed value, object|void codec, @ -  *! int|void trace) + /*! @decl string encode_value_canonic(mixed value, object|void codec)    *!    *! Code a value into a string on canonical form.    *!
1258:    data=&d;       check_all_args("encode_value_canonic", args, BIT_MIXED, BIT_VOID | BIT_OBJECT, -  BIT_VOID | BIT_INT, 0); + #ifdef ENCODE_DEBUG +  /* This argument is only an internal debug helper. +  * It's intentionally not part of the function +  * prototype, to keep the argument position free for +  * other uses in the future. */ +  BIT_VOID | BIT_INT, + #endif +  0);       initialize_buf(&data->buf);    data->canonic = 1;
3045:    }   }    - /*! @decl mixed decode_value(string coded_value, object|void codec, @ -  *! int|void trace) + /*! @decl mixed decode_value(string coded_value, object|void codec)    *!    *! Decode a value from a string.    *!
3070:       check_all_args("decode_value", args,    BIT_STRING, BIT_VOID | BIT_OBJECT | BIT_INT, -  BIT_VOID | BIT_INT, 0); + #ifdef ENCODE_DEBUG +  /* This argument is only an internal debug helper. +  * It's intentionally not part of the function +  * prototype, to keep the argument position free for +  * other uses in the future. */ +  BIT_VOID | BIT_INT, + #endif +  0);      #ifdef ENCODE_DEBUG    debug = args > 2 ? Pike_sp[2-args].u.integer : 0;