diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 6 | ||||
-rw-r--r-- | generic/tclEncoding.c | 23 |
2 files changed, 26 insertions, 3 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 6ec47c6..23d1d82 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2413,6 +2413,12 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, (exact)|(TCL_MAJOR_VERSION<<8)|(TCL_MINOR_VERSION<<16)) #endif +/* Tcl_InitSubsystems, see TIP #414 */ + +#ifndef USE_TCL_STUBS + EXTERN const char *Tcl_InitSubsystems(TCL_NORETURN1 Tcl_PanicProc *panicProc); +#endif + /* * Public functions that are not accessible via the stubs table. * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171] diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 91c2278..0982492 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1438,10 +1438,10 @@ Tcl_UtfToExternal( /* *--------------------------------------------------------------------------- * - * Tcl_FindExecutable -- + * Tcl_InitSubsystems/Tcl_FindExecutable -- * - * This function computes the absolute path name of the current - * application, given its argv[0] value. + * This function initializes everything needed for the Tcl library + * to be able to operate. * * Results: * None. @@ -1452,6 +1452,23 @@ Tcl_UtfToExternal( * *--------------------------------------------------------------------------- */ +MODULE_SCOPE const TclStubs tclStubs; + +static const struct { + const TclStubs *stubs; + const char version[12]; +} stubInfo = { + &tclStubs, TCL_PATCH_LEVEL +}; + +const char * +Tcl_InitSubsystems(TCL_NORETURN1 Tcl_PanicProc *panicProc) +{ + Tcl_SetPanicProc(panicProc); + TclInitSubsystems(); + return stubInfo.version; +} + #undef Tcl_FindExecutable void Tcl_FindExecutable( |