diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-25 09:52:14 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-11-25 09:52:14 (GMT) |
commit | 7c1cfd6e15ac7576de46ec5592d9cbf226d464c9 (patch) | |
tree | 9c728bcbefb36d540b5759187f23fe60d1a8e2aa /generic/tclStubInit.c | |
parent | 1aa3608a1c3ecda44c952d36c2f2bbd4f23cedc4 (diff) | |
parent | aca216973f4109eff4ca90dd967295a28819e491 (diff) | |
download | tcl-7c1cfd6e15ac7576de46ec5592d9cbf226d464c9.zip tcl-7c1cfd6e15ac7576de46ec5592d9cbf226d464c9.tar.gz tcl-7c1cfd6e15ac7576de46ec5592d9cbf226d464c9.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclStubInit.c')
-rw-r--r-- | generic/tclStubInit.c | 468 |
1 files changed, 390 insertions, 78 deletions
diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 38d2841..1f29b04 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -10,7 +10,8 @@ */ #include "tclInt.h" -#include "tommath.h" +#include "tommath_private.h" +#include "tclTomMath.h" #ifdef __CYGWIN__ # include <wchar.h> @@ -39,12 +40,21 @@ #undef Tcl_NewObj #undef Tcl_NewStringObj #undef Tcl_GetUnicode +#undef Tcl_GetUnicodeFromObj +#undef Tcl_AppendUnicodeToObj +#undef Tcl_NewUnicodeObj +#undef Tcl_SetUnicodeObj +#undef Tcl_UniCharNcasecmp +#undef Tcl_UniCharCaseMatch +#undef Tcl_UniCharLen +#undef Tcl_UniCharNcmp #undef Tcl_DumpActiveMemory #undef Tcl_ValidateAllMemory #undef Tcl_FindHashEntry #undef Tcl_CreateHashEntry #undef Tcl_Panic #undef Tcl_FindExecutable +#undef Tcl_SetExitProc #undef Tcl_SetPanicProc #undef TclpGetPid #undef TclSockMinimumBuffers @@ -55,6 +65,94 @@ #undef TclWinGetSockOpt #undef TclWinSetSockOpt #undef TclWinNToHS +#undef TclStaticPackage +#undef Tcl_BackgroundError +#undef TclGuessPackageName +#undef TclGetLoadedPackages +#define TclStaticPackage Tcl_StaticPackage +#undef Tcl_UniCharToUtfDString +#undef Tcl_UtfToUniCharDString +#undef Tcl_UtfToUniChar +#undef Tcl_MacOSXOpenBundleResources + +#if TCL_UTF_MAX > 3 +static void uniCodePanic(void) { + Tcl_Panic("This extension uses a deprecated function, not available now: Tcl is compiled with -DTCL_UTF_MAX==%d", TCL_UTF_MAX); +} +# define Tcl_GetUnicode (int *(*)(Tcl_Obj *))(void *)uniCodePanic +# define Tcl_GetUnicodeFromObj (int *(*)(Tcl_Obj *, Tcl_UniChar *))(void *)uniCodePanic +# define Tcl_NewUnicodeObj (Tcl_Obj *(*)(const int *, Tcl_UniChar))(void *)uniCodePanic +# define Tcl_SetUnicodeObj (void(*)(Tcl_Obj *, const Tcl_UniChar *, int))(void *)uniCodePanic +# define Tcl_AppendUnicodeToObj (void(*)(Tcl_Obj *, const Tcl_UniChar *, int))(void *)uniCodePanic +# define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar *, const Tcl_UniChar *, unsigned long))(void *)uniCodePanic +# define Tcl_UniCharCaseMatch (int(*)(const Tcl_UniChar *, const Tcl_UniChar *, int))(void *)uniCodePanic +# define Tcl_UniCharLen (int(*)(const Tcl_UniChar *))(void *)uniCodePanic +# define Tcl_UniCharNcmp (int(*)(const Tcl_UniChar *, const Tcl_UniChar *, unsigned long))(void *)uniCodePanic +#endif + +#define TclBN_mp_add mp_add +#define TclBN_mp_and mp_and +#define TclBN_mp_clamp mp_clamp +#define TclBN_mp_clear mp_clear +#define TclBN_mp_clear_multi mp_clear_multi +#define TclBN_mp_cmp mp_cmp +#define TclBN_mp_cmp_mag mp_cmp_mag +#define TclBN_mp_cnt_lsb mp_cnt_lsb +#define TclBN_mp_copy mp_copy +#define TclBN_mp_count_bits mp_count_bits +#define TclBN_mp_div mp_div +#define TclBN_mp_div_2 mp_div_2 +#define TclBN_mp_div_2d mp_div_2d +#define TclBN_mp_exch mp_exch +#define TclBN_mp_get_mag_u64 mp_get_mag_u64 +#define TclBN_mp_grow mp_grow +#define TclBN_mp_init mp_init +#define TclBN_mp_init_copy mp_init_copy +#define TclBN_mp_init_multi mp_init_multi +#define TclBN_mp_init_size mp_init_size +#define TclBN_mp_init_i64 mp_init_i64 +#define TclBN_mp_init_u64 mp_init_u64 +#define TclBN_mp_lshd mp_lshd +#define TclBN_mp_mod mp_mod +#define TclBN_mp_mod_2d mp_mod_2d +#define TclBN_mp_mul mp_mul +#define TclBN_mp_mul_2 mp_mul_2 +#define TclBN_mp_mul_2d mp_mul_2d +#define TclBN_mp_neg mp_neg +#define TclBN_mp_or mp_or +#define TclBN_mp_radix_size mp_radix_size +#define TclBN_mp_reverse mp_reverse +#define TclBN_mp_read_radix mp_read_radix +#define TclBN_mp_rshd mp_rshd +#define TclBN_mp_set_i64 mp_set_i64 +#define TclBN_mp_set_u64 mp_set_u64 +#define TclBN_mp_shrink mp_shrink +#define TclBN_mp_sqr mp_sqr +#define TclBN_mp_sqrt mp_sqrt +#define TclBN_mp_sub mp_sub +#define TclBN_mp_signed_rsh mp_signed_rsh +#define TclBN_mp_tc_and TclBN_mp_and +#define TclBN_mp_tc_div_2d mp_signed_rsh +#define TclBN_mp_tc_or TclBN_mp_or +#define TclBN_mp_tc_xor TclBN_mp_xor +#define TclBN_mp_to_radix mp_to_radix +#define TclBN_mp_to_ubin mp_to_ubin +#define TclBN_mp_ubin_size mp_ubin_size +#define TclBN_mp_xor mp_xor +#define TclBN_mp_zero mp_zero +#define TclBN_s_mp_add s_mp_add +#define TclBN_s_mp_balance_mul mp_balance_mul +#define TclBN_mp_karatsuba_mul s_mp_karatsuba_mul +#define TclBN_mp_karatsuba_sqr s_mp_karatsuba_sqr +#define TclBN_s_mp_mul_digs s_mp_mul_digs +#define TclBN_s_mp_mul_digs_fast s_mp_mul_digs_fast +#define TclBN_s_mp_reverse s_mp_reverse +#define TclBN_s_mp_sqr s_mp_sqr +#define TclBN_s_mp_sqr_fast s_mp_sqr_fast +#define TclBN_s_mp_sub s_mp_sub +#define TclBN_mp_toom_mul s_mp_toom_mul +#define TclBN_mp_toom_sqr s_mp_toom_sqr +#define TclUnusedStubEntry NULL /* See bug 510001: TclSockMinimumBuffers needs plat imp */ #if defined(_WIN64) || defined(TCL_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 @@ -67,7 +165,72 @@ static int TclSockMinimumBuffersOld(int sock, int size) } #endif +mp_err TclBN_mp_set_int(mp_int *a, unsigned long i) +{ + TclBN_mp_set_u64(a, i); + return MP_OKAY; +} + +static mp_err TclBN_mp_set_long(mp_int *a, unsigned long i) +{ + TclBN_mp_set_u64(a, i); + return MP_OKAY; +} + +#define TclBN_mp_set_ul (void (*)(mp_int *a, unsigned long i))(void *)TclBN_mp_set_long + +mp_err MP_WUR TclBN_mp_expt_u32(const mp_int *a, unsigned int b, mp_int *c) { + return mp_expt_u32(a, b, c); +} +mp_err TclBN_mp_add_d(const mp_int *a, unsigned int b, mp_int *c) { + return mp_add_d(a, b, c); +} +mp_err TclBN_mp_cmp_d(const mp_int *a, unsigned int b) { + return mp_cmp_d(a, b); +} +mp_err TclBN_mp_sub_d(const mp_int *a, unsigned int b, mp_int *c) { + return mp_sub_d(a, b, c); +} +mp_err TclBN_mp_div_d(const mp_int *a, unsigned int b, mp_int *c, unsigned int *d) { + mp_digit d2; + mp_err result = mp_div_d(a, b, c, (d ? &d2 : NULL)); + if (d) { + *d = d2; + } + return result; +} +mp_err TclBN_mp_div_ld(const mp_int *a, uint64_t b, mp_int *c, uint64_t *d) { + mp_err result; + mp_digit d2; + + if ((b | (mp_digit)-1) != (mp_digit)-1) { + return MP_VAL; + } + result = mp_div_d(a, b, c, (d ? &d2 : NULL)); + if (d) { + *d = d2; + } + return result; +} +mp_err TclBN_mp_init_set(mp_int *a, unsigned int b) { + return mp_init_set(a, b); +} +mp_err TclBN_mp_mul_d(const mp_int *a, unsigned int b, mp_int *c) { + return mp_mul_d(a, b, c); +} + #if defined(TCL_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 +# define TclBN_mp_expt_d_ex 0 +# define TclBN_mp_to_unsigned_bin 0 +# define TclBN_mp_to_unsigned_bin_n 0 +# define TclBN_mp_toradix_n 0 +# undef TclBN_mp_sqr +# define TclBN_mp_sqr 0 +# undef TclBN_mp_div_3 +# define TclBN_mp_div_3 0 +# define TclBN_mp_init_l 0 +# define TclBN_mp_init_ul 0 +# define TclBN_mp_set 0 # define TclSetStartupScriptPath 0 # define TclGetStartupScriptPath 0 # define TclSetStartupScriptFileName 0 @@ -82,9 +245,6 @@ static int TclSockMinimumBuffersOld(int sock, int size) # define TclWinResetInterfaces 0 # define TclWinSetInterfaces 0 # define TclWinGetPlatformId 0 -# define TclBNInitBignumFromWideUInt 0 -# define TclBNInitBignumFromWideInt 0 -# define TclBNInitBignumFromLong 0 # define Tcl_Backslash 0 # define Tcl_GetDefaultEncodingDir 0 # define Tcl_SetDefaultEncodingDir 0 @@ -92,7 +252,98 @@ static int TclSockMinimumBuffersOld(int sock, int size) # define Tcl_CreateMathFunc 0 # define Tcl_GetMathFuncInfo 0 # define Tcl_ListMathFuncs 0 +# define Tcl_SetIntObj 0 +# define Tcl_SetLongObj 0 +# define Tcl_NewIntObj 0 +# define Tcl_NewLongObj 0 +# define Tcl_DbNewLongObj 0 +# define Tcl_BackgroundError 0 +# define Tcl_FreeResult 0 +# define Tcl_ChannelSeekProc 0 +# define Tcl_ChannelCloseProc 0 +# define Tcl_Close 0 +# define Tcl_MacOSXOpenBundleResources 0 +# define TclGuessPackageName 0 +# define TclGetLoadedPackages 0 #else + +#define TclGuessPackageName guessPackageName +static int TclGuessPackageName( + TCL_UNUSED(const char *), + TCL_UNUSED(Tcl_DString *)) { + return 0; +} +#define TclGetLoadedPackages getLoadedPackages +static int TclGetLoadedPackages( + Tcl_Interp *interp, /* Interpreter in which to return information + * or error message. */ + const char *targetName) /* Name of target interpreter or NULL. If + * NULL, return info about all interps; + * otherwise, just return info about this + * interpreter. */ +{ + return TclGetLoadedPackagesEx(interp, targetName, NULL); +} + +mp_err TclBN_mp_div_3(const mp_int *a, mp_int *c, unsigned int *d) { + mp_digit d2; + mp_err result = mp_div_d(a, 3, c, &d2); + if (d) { + *d = d2; + } + return result; +} + +int TclBN_mp_expt_d_ex(const mp_int *a, unsigned int b, mp_int *c, + TCL_UNUSED(int) /*fast*/) +{ + return TclBN_mp_expt_u32(a, b, c); +} + +mp_err TclBN_mp_to_unsigned_bin(const mp_int *a, unsigned char *b) +{ + return TclBN_mp_to_ubin(a, b, INT_MAX, NULL); +} + +mp_err TclBN_mp_to_unsigned_bin_n(const mp_int *a, unsigned char *b, unsigned long *outlen) +{ + size_t n = TclBN_mp_ubin_size(a); + if (*outlen < (unsigned long)n) { + return MP_VAL; + } + *outlen = (unsigned long)n; + return TclBN_mp_to_ubin(a, b, n, NULL); +} + +void TclBN_reverse(unsigned char *s, int len) +{ + if (len > 0) { + TclBN_s_mp_reverse(s, (size_t)len); + } +} + +mp_err TclBN_mp_init_ul(mp_int *a, unsigned long b) +{ + return TclBN_mp_init_u64(a,b); +} + +mp_err TclBN_mp_init_l(mp_int *a, long b) +{ + return TclBN_mp_init_i64(a,b); +} + +void TclBN_mp_set(mp_int *a, unsigned int b) { + TclBN_mp_set_u64(a, b); +} + +mp_err TclBN_mp_toradix_n(const mp_int *a, char *str, int radix, int maxlen) +{ + if (maxlen < 0) { + return MP_VAL; + } + return TclBN_mp_to_radix(a, str, maxlen, NULL, radix); +} + #define TclSetStartupScriptPath setStartupScriptPath static void TclSetStartupScriptPath(Tcl_Obj *path) { @@ -141,11 +392,18 @@ TclWinGetPlatformId(void) #define TclWinResetInterfaces doNothing #define TclWinSetInterfaces (void (*) (int)) doNothing #endif -# define TclBNInitBignumFromWideUInt TclInitBignumFromWideUInt -# define TclBNInitBignumFromWideInt TclInitBignumFromWideInt -# define TclBNInitBignumFromLong TclInitBignumFromLong #endif /* TCL_NO_DEPRECATED */ +#define TclpCreateTempFile_ TclpCreateTempFile +#define TclUnixWaitForFile_ TclUnixWaitForFile +#ifndef MAC_OSX_TCL /* On UNIX, fill with other stub entries */ +#define TclMacOSXGetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj **))(void *)TclpCreateProcess +#define TclMacOSXSetFileAttribute (int (*)(Tcl_Interp *, int, Tcl_Obj *, Tcl_Obj *))(void *)isatty +#define TclMacOSXCopyFileAttributes (int (*)(const char *, const char *, const Tcl_StatBuf *))(void *)TclUnixCopyFile +#define TclMacOSXMatchType (int (*)(Tcl_Interp *, const char *, const char *, Tcl_StatBuf *, Tcl_GlobTypeData *))(void *)TclpMakeFile +#define TclMacOSXNotifierAddRunLoopMode (void (*)(const void *))(void *)TclpOpenFile +#endif + #ifdef _WIN32 # define TclUnixWaitForFile 0 # define TclUnixCopyFile 0 @@ -153,7 +411,7 @@ TclWinGetPlatformId(void) # define TclpReaddir 0 # define TclpIsAtty 0 #elif defined(__CYGWIN__) -# define TclpIsAtty TclPlatIsAtty +# define TclpIsAtty isatty #if defined(TCL_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 static void doNothing(void) @@ -164,20 +422,6 @@ doNothing(void) # define TclWinAddProcess (void (*) (void *, unsigned int)) doNothing # define TclWinFlushDirtyChannels doNothing -static int -TclpIsAtty(int fd) -{ - return isatty(fd); -} - -void *TclWinGetTclInstance() -{ - void *hInstance = NULL; - GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, - (const char *)&TclpIsAtty, &hInstance); - return hInstance; -} - #if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 #define TclWinSetSockOpt winSetSockOpt static int @@ -217,12 +461,22 @@ TclWinNoBackslash(char *path) return path; } +void *TclWinGetTclInstance() +{ + void *hInstance = NULL; + GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, + (const wchar_t *)&TclWinNoBackslash, &hInstance); + return hInstance; +} + int TclpGetPid(Tcl_Pid pid) { - return (int) (size_t) pid; + return (int)(size_t)pid; } +#if !defined(TCL_NO_DEPRECATED) && TCL_MAJOR_VERSION < 9 +#undef Tcl_WinUtfToTChar char * Tcl_WinUtfToTChar( const char *string, @@ -230,12 +484,9 @@ Tcl_WinUtfToTChar( Tcl_DString *dsPtr) { Tcl_DStringInit(dsPtr); - if (!string) { - return NULL; - } - return (char *)Tcl_UtfToUniCharDString(string, len, dsPtr); + return (char *)Tcl_UtfToChar16DString(string, len, dsPtr); } - +#undef Tcl_WinTCharToUtf char * Tcl_WinTCharToUtf( const char *string, @@ -243,16 +494,9 @@ Tcl_WinTCharToUtf( Tcl_DString *dsPtr) { Tcl_DStringInit(dsPtr); - if (!string) { - return NULL; - } - if (len < 0) { - len = wcslen((wchar_t *)string); - } else { - len /= 2; - } - return Tcl_UniCharToUtfDString((Tcl_UniChar *)string, len, dsPtr); + return Tcl_Char16ToUtfDString((const unsigned short *)string, len >> 1, dsPtr); } +#endif /* !defined(TCL_NO_DEPRECATED) */ #if defined(TCL_WIDE_INT_IS_LONG) /* On Cygwin64, long is 64-bit while on Win64 long is 32-bit. Therefore @@ -292,22 +536,24 @@ static int exprIntObj(Tcl_Interp *interp, Tcl_Obj*expr, int *ptr){ return result; } #define Tcl_ExprLongObj (int(*)(Tcl_Interp*,Tcl_Obj*,long*))exprIntObj +#if TCL_UTF_MAX < 4 && !defined(TCL_NO_DEPRECATED) static int uniCharNcmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){ return Tcl_UniCharNcmp(ucs, uct, (unsigned long)n); } -#define Tcl_UniCharNcmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcmp +#define Tcl_UniCharNcmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))(void *)uniCharNcmp +static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){ + return Tcl_UniCharNcasecmp(ucs, uct, (unsigned long)n); +} +#define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))(void *)uniCharNcasecmp +#endif static int utfNcmp(const char *s1, const char *s2, unsigned int n){ return Tcl_UtfNcmp(s1, s2, (unsigned long)n); } -#define Tcl_UtfNcmp (int(*)(const char*,const char*,unsigned long))utfNcmp +#define Tcl_UtfNcmp (int(*)(const char*,const char*,unsigned long))(void *)utfNcmp static int utfNcasecmp(const char *s1, const char *s2, unsigned int n){ return Tcl_UtfNcasecmp(s1, s2, (unsigned long)n); } -#define Tcl_UtfNcasecmp (int(*)(const char*,const char*,unsigned long))utfNcasecmp -static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsigned int n){ - return Tcl_UniCharNcasecmp(ucs, uct, (unsigned long)n); -} -#define Tcl_UniCharNcasecmp (int(*)(const Tcl_UniChar*,const Tcl_UniChar*,unsigned long))uniCharNcasecmp +#define Tcl_UtfNcasecmp (int(*)(const char*,const char*,unsigned long))(void *)utfNcasecmp #endif /* TCL_WIDE_INT_IS_LONG */ @@ -353,6 +599,8 @@ static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsig # define Tcl_Eval 0 # undef Tcl_GlobalEval # define Tcl_GlobalEval 0 +# undef Tcl_GetStringResult +# define Tcl_GetStringResult 0 # undef Tcl_SaveResult # define Tcl_SaveResult 0 # undef Tcl_RestoreResult @@ -370,6 +618,7 @@ static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsig # define TclpReaddir 0 # define TclSetStartupScript 0 # define TclGetStartupScript 0 +# define TclGetIntForIndex 0 # define TclCreateNamespace 0 # define TclDeleteNamespace 0 # define TclAppendExportList 0 @@ -396,13 +645,47 @@ static int uniCharNcasecmp(const Tcl_UniChar *ucs, const Tcl_UniChar *uct, unsig # define TclpGmtime 0 # define TclpLocaltime_unix 0 # define TclpGmtime_unix 0 +# define Tcl_SetExitProc 0 +# define Tcl_SetPanicProc 0 +# define Tcl_FindExecutable 0 # define Tcl_GetUnicode 0 +#if TCL_UTF_MAX < 4 +# define Tcl_AppendUnicodeToObj 0 +# define Tcl_UniCharCaseMatch 0 +# define Tcl_UniCharLen 0 +# define Tcl_UniCharNcasecmp 0 +# define Tcl_UniCharNcmp 0 +#endif +# undef Tcl_StringMatch +# define Tcl_StringMatch 0 +# define TclBN_reverse 0 +# undef TclBN_s_mp_mul_digs_fast +# define TclBN_s_mp_mul_digs_fast 0 +# undef TclBN_s_mp_sqr_fast +# define TclBN_s_mp_sqr_fast 0 +# undef TclBN_mp_karatsuba_mul +# define TclBN_mp_karatsuba_mul 0 +# undef TclBN_mp_karatsuba_sqr +# define TclBN_mp_karatsuba_sqr 0 +# undef TclBN_mp_toom_mul +# define TclBN_mp_toom_mul 0 +# undef TclBN_mp_toom_sqr +# define TclBN_mp_toom_sqr 0 +# undef TclBN_s_mp_add +# define TclBN_s_mp_add 0 +# undef TclBN_s_mp_mul_digs +# define TclBN_s_mp_mul_digs 0 +# undef TclBN_s_mp_sqr +# define TclBN_s_mp_sqr 0 +# undef TclBN_s_mp_sub +# define TclBN_s_mp_sub 0 #else /* TCL_NO_DEPRECATED */ # define Tcl_SeekOld seekOld # define Tcl_TellOld tellOld # define TclBackgroundException Tcl_BackgroundException # define TclSetStartupScript Tcl_SetStartupScript # define TclGetStartupScript Tcl_GetStartupScript +# define TclGetIntForIndex Tcl_GetIntForIndex # define TclCreateNamespace Tcl_CreateNamespace # define TclDeleteNamespace Tcl_DeleteNamespace # define TclAppendExportList Tcl_AppendExportList @@ -435,6 +718,11 @@ tellOld( } #endif /* !TCL_NO_DEPRECATED */ +#if defined(TCL_NO_DEPRECATED) || TCL_MAJOR_VERSION > 8 +#define Tcl_WinUtfToTChar 0 +#define Tcl_WinTCharToUtf 0 +#endif + /* * WARNING: The contents of this file is automatically generated by the * tools/genStubs.tcl script. Any modifications to the function declarations @@ -708,13 +996,17 @@ static const TclIntStubs tclIntStubs = { TclResetRewriteEnsemble, /* 247 */ TclCopyChannel, /* 248 */ TclDoubleDigits, /* 249 */ - TclSetSlaveCancelFlags, /* 250 */ + TclSetChildCancelFlags, /* 250 */ TclRegisterLiteral, /* 251 */ TclPtrGetVar, /* 252 */ TclPtrSetVar, /* 253 */ TclPtrIncrObjVar, /* 254 */ TclPtrObjMakeUpvar, /* 255 */ TclPtrUnsetVar, /* 256 */ + TclStaticPackage, /* 257 */ + TclpCreateTemporaryDirectory, /* 258 */ + TclGetBytesFromObj, /* 259 */ + TclUnusedStubEntry, /* 260 */ }; static const TclIntPlatStubs tclIntPlatStubs = { @@ -726,7 +1018,7 @@ static const TclIntPlatStubs tclIntPlatStubs = { TclpCreateCommandChannel, /* 2 */ TclpCreatePipe, /* 3 */ TclpCreateProcess, /* 4 */ - 0, /* 5 */ + TclUnixWaitForFile_, /* 5 */ TclpMakeFile, /* 6 */ TclpOpenFile, /* 7 */ TclUnixWaitForFile, /* 8 */ @@ -736,14 +1028,14 @@ static const TclIntPlatStubs tclIntPlatStubs = { TclpGmtime_unix, /* 12 */ TclpInetNtoa, /* 13 */ TclUnixCopyFile, /* 14 */ - 0, /* 15 */ - 0, /* 16 */ - 0, /* 17 */ - 0, /* 18 */ - 0, /* 19 */ + TclMacOSXGetFileAttribute, /* 15 */ + TclMacOSXSetFileAttribute, /* 16 */ + TclMacOSXCopyFileAttributes, /* 17 */ + TclMacOSXMatchType, /* 18 */ + TclMacOSXNotifierAddRunLoopMode, /* 19 */ 0, /* 20 */ 0, /* 21 */ - 0, /* 22 */ + TclpCreateTempFile_, /* 22 */ 0, /* 23 */ 0, /* 24 */ 0, /* 25 */ @@ -792,7 +1084,7 @@ static const TclIntPlatStubs tclIntPlatStubs = { TclpCreateCommandChannel, /* 2 */ TclpCreatePipe, /* 3 */ TclpCreateProcess, /* 4 */ - 0, /* 5 */ + TclUnixWaitForFile_, /* 5 */ TclpMakeFile, /* 6 */ TclpOpenFile, /* 7 */ TclUnixWaitForFile, /* 8 */ @@ -809,7 +1101,7 @@ static const TclIntPlatStubs tclIntPlatStubs = { TclMacOSXNotifierAddRunLoopMode, /* 19 */ 0, /* 20 */ 0, /* 21 */ - 0, /* 22 */ + TclpCreateTempFile_, /* 22 */ 0, /* 23 */ 0, /* 24 */ 0, /* 25 */ @@ -856,7 +1148,7 @@ const TclTomMathStubs tclTomMathStubs = { TclBN_mp_div_2d, /* 16 */ TclBN_mp_div_3, /* 17 */ TclBN_mp_exch, /* 18 */ - TclBN_mp_expt_d, /* 19 */ + TclBN_mp_expt_u32, /* 19 */ TclBN_mp_grow, /* 20 */ TclBN_mp_init, /* 21 */ TclBN_mp_init_copy, /* 22 */ @@ -884,12 +1176,12 @@ const TclTomMathStubs tclTomMathStubs = { TclBN_mp_to_unsigned_bin, /* 44 */ TclBN_mp_to_unsigned_bin_n, /* 45 */ TclBN_mp_toradix_n, /* 46 */ - TclBN_mp_unsigned_bin_size, /* 47 */ + TclBN_mp_ubin_size, /* 47 */ TclBN_mp_xor, /* 48 */ TclBN_mp_zero, /* 49 */ TclBN_reverse, /* 50 */ - TclBN_fast_s_mp_mul_digs, /* 51 */ - TclBN_fast_s_mp_sqr, /* 52 */ + TclBN_s_mp_mul_digs_fast, /* 51 */ + TclBN_s_mp_sqr_fast, /* 52 */ TclBN_mp_karatsuba_mul, /* 53 */ TclBN_mp_karatsuba_sqr, /* 54 */ TclBN_mp_toom_mul, /* 55 */ @@ -898,18 +1190,26 @@ const TclTomMathStubs tclTomMathStubs = { TclBN_s_mp_mul_digs, /* 58 */ TclBN_s_mp_sqr, /* 59 */ TclBN_s_mp_sub, /* 60 */ - TclBN_mp_init_set_int, /* 61 */ - TclBN_mp_set_int, /* 62 */ + TclBN_mp_init_ul, /* 61 */ + TclBN_mp_set_ul, /* 62 */ TclBN_mp_cnt_lsb, /* 63 */ - TclBNInitBignumFromLong, /* 64 */ - TclBNInitBignumFromWideInt, /* 65 */ - TclBNInitBignumFromWideUInt, /* 66 */ + TclBN_mp_init_l, /* 64 */ + TclBN_mp_init_i64, /* 65 */ + TclBN_mp_init_u64, /* 66 */ TclBN_mp_expt_d_ex, /* 67 */ - TclBN_mp_set_long_long, /* 68 */ - TclBN_mp_get_long_long, /* 69 */ - TclBN_mp_set_long, /* 70 */ - TclBN_mp_get_long, /* 71 */ - TclBN_mp_get_int, /* 72 */ + TclBN_mp_set_u64, /* 68 */ + TclBN_mp_get_mag_u64, /* 69 */ + TclBN_mp_set_i64, /* 70 */ + 0, /* 71 */ + 0, /* 72 */ + TclBN_mp_tc_and, /* 73 */ + TclBN_mp_tc_or, /* 74 */ + TclBN_mp_tc_xor, /* 75 */ + TclBN_mp_signed_rsh, /* 76 */ + 0, /* 77 */ + TclBN_mp_to_ubin, /* 78 */ + TclBN_mp_div_ld, /* 79 */ + TclBN_mp_to_radix, /* 80 */ }; static const TclStubHooks tclStubHooks = { @@ -1034,7 +1334,7 @@ const TclStubs tclStubs = { Tcl_CreateInterp, /* 94 */ Tcl_CreateMathFunc, /* 95 */ Tcl_CreateObjCommand, /* 96 */ - Tcl_CreateSlave, /* 97 */ + Tcl_CreateChild, /* 97 */ Tcl_CreateTimerHandler, /* 98 */ Tcl_CreateTrace, /* 99 */ Tcl_DeleteAssocData, /* 100 */ @@ -1101,7 +1401,7 @@ const TclStubs tclStubs = { Tcl_GetErrno, /* 161 */ Tcl_GetHostName, /* 162 */ Tcl_GetInterpPath, /* 163 */ - Tcl_GetMaster, /* 164 */ + Tcl_GetParent, /* 164 */ Tcl_GetNameOfExecutable, /* 165 */ Tcl_GetObjResult, /* 166 */ #if !defined(_WIN32) && !defined(MAC_OSX_TCL) /* UNIX */ @@ -1117,7 +1417,7 @@ const TclStubs tclStubs = { Tcl_Gets, /* 169 */ Tcl_GetsObj, /* 170 */ Tcl_GetServiceMode, /* 171 */ - Tcl_GetSlave, /* 172 */ + Tcl_GetChild, /* 172 */ Tcl_GetStdChannel, /* 173 */ Tcl_GetStringResult, /* 174 */ Tcl_GetVar, /* 175 */ @@ -1281,7 +1581,7 @@ const TclStubs tclStubs = { Tcl_UtfToExternalDString, /* 333 */ Tcl_UtfToLower, /* 334 */ Tcl_UtfToTitle, /* 335 */ - Tcl_UtfToUniChar, /* 336 */ + Tcl_UtfToChar16, /* 336 */ Tcl_UtfToUpper, /* 337 */ Tcl_WriteChars, /* 338 */ Tcl_WriteObj, /* 339 */ @@ -1299,8 +1599,8 @@ const TclStubs tclStubs = { Tcl_UniCharIsWordChar, /* 351 */ Tcl_UniCharLen, /* 352 */ Tcl_UniCharNcmp, /* 353 */ - Tcl_UniCharToUtfDString, /* 354 */ - Tcl_UtfToUniCharDString, /* 355 */ + Tcl_Char16ToUtfDString, /* 354 */ + Tcl_UtfToChar16DString, /* 355 */ Tcl_GetRegExpFromObj, /* 356 */ Tcl_EvalTokens, /* 357 */ Tcl_FreeParse, /* 358 */ @@ -1581,10 +1881,22 @@ const TclStubs tclStubs = { TclZipfs_Unmount, /* 633 */ TclZipfs_TclLibrary, /* 634 */ TclZipfs_MountBuffer, /* 635 */ - 0, /* 636 */ - Tcl_GetStringFromObj2, /* 637 */ - Tcl_GetUnicodeFromObj2, /* 638 */ - Tcl_GetByteArrayFromObj2, /* 639 */ + Tcl_FreeIntRep, /* 636 */ + Tcl_InitStringRep, /* 637 */ + Tcl_FetchIntRep, /* 638 */ + Tcl_StoreIntRep, /* 639 */ + Tcl_HasStringRep, /* 640 */ + Tcl_IncrRefCount, /* 641 */ + Tcl_DecrRefCount, /* 642 */ + Tcl_IsShared, /* 643 */ + Tcl_LinkArray, /* 644 */ + Tcl_GetIntForIndex, /* 645 */ + Tcl_UtfToUniChar, /* 646 */ + Tcl_UniCharToUtfDString, /* 647 */ + Tcl_UtfToUniCharDString, /* 648 */ + Tcl_GetStringFromObj2, /* 649 */ + Tcl_GetUnicodeFromObj2, /* 650 */ + Tcl_GetByteArrayFromObj2, /* 651 */ }; /* !END!: Do not edit above this line. */ |