diff options
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r-- | generic/tclStubInit.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 20142cd..0a1cea3 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -57,6 +57,7 @@ #define TclBN_mp_tc_and TclBN_mp_and #define TclBN_mp_tc_or TclBN_mp_or #define TclBN_mp_tc_xor TclBN_mp_xor +#define TclUnusedStubEntry NULL /* See bug 510001: TclSockMinimumBuffers needs plat imp */ #ifdef _WIN64 @@ -424,6 +425,38 @@ static int formatInt(char *buffer, int n){ # define TclpGmtime_unix TclpGmtime #endif +mp_err mp_to_unsigned_bin(const mp_int *a, unsigned char *b) +{ + return mp_to_ubin(a, b, INT_MAX, NULL); +} + +mp_err mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b, unsigned long *outlen) +{ + size_t n = mp_ubin_size(a); + if (*outlen < (unsigned long)n) { + return MP_VAL; + } + *outlen = (unsigned long)n; + return mp_to_ubin(a, b, n, NULL); +} + +mp_err mp_toradix_n(const mp_int *a, char *str, int radix, int maxlen) +{ + if (maxlen < 0) { + return MP_VAL; + } + return mp_to_radix(a, str, (size_t)maxlen, NULL, radix); +} +#undef TclBN_mp_unsigned_bin_size +#define TclBN_mp_unsigned_bin_size (int (*)(const mp_int *a)) mp_ubin_size + +void bn_reverse(unsigned char *s, int len) +{ + if (len > 0) { + s_mp_reverse(s, (size_t)len); + } +} + /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations @@ -695,6 +728,8 @@ static const TclIntStubs tclIntStubs = { TclPtrIncrObjVar, /* 254 */ TclPtrObjMakeUpvar, /* 255 */ TclPtrUnsetVar, /* 256 */ + 0, /* 257 */ + TclUnusedStubEntry, /* 258 */ }; static const TclIntPlatStubs tclIntPlatStubs = { @@ -1561,6 +1596,24 @@ const TclStubs tclStubs = { Tcl_FindSymbol, /* 628 */ Tcl_FSUnloadFile, /* 629 */ Tcl_ZlibStreamSetCompressionDictionary, /* 630 */ + 0, /* 631 */ + 0, /* 632 */ + 0, /* 633 */ + 0, /* 634 */ + 0, /* 635 */ + 0, /* 636 */ + 0, /* 637 */ + 0, /* 638 */ + 0, /* 639 */ + 0, /* 640 */ + 0, /* 641 */ + 0, /* 642 */ + 0, /* 643 */ + 0, /* 644 */ + 0, /* 645 */ + 0, /* 646 */ + 0, /* 647 */ + TclUnusedStubEntry, /* 648 */ }; /* !END!: Do not edit above this line. */ |