diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-08-19 09:05:33 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-08-19 09:05:33 (GMT) |
commit | 5e0f0ee61ad284f3316b43a640bbd0efe95c7b50 (patch) | |
tree | dd50e19c3f6158797d8aa3b192496e9308d65d84 /generic | |
parent | c084f0ea7500fe34df2ba6f00c46d310dbe542a0 (diff) | |
parent | 332f11d64664d8571225b798224bedab6cf87f84 (diff) | |
download | tcl-5e0f0ee61ad284f3316b43a640bbd0efe95c7b50.zip tcl-5e0f0ee61ad284f3316b43a640bbd0efe95c7b50.tar.gz tcl-5e0f0ee61ad284f3316b43a640bbd0efe95c7b50.tar.bz2 |
rebase TIP [http://tip.tcl.tk/414|414] implementation
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 7 | ||||
-rw-r--r-- | generic/tclEncoding.c | 25 |
2 files changed, 28 insertions, 4 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index a833218..bc98109 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2398,6 +2398,7 @@ const char * Tcl_InitStubs(Tcl_Interp *interp, const char *version, const char * TclTomMathInitializeStubs(Tcl_Interp *interp, const char *version, int epoch, int revision); + /* * When not using stubs, make it a macro. */ @@ -2411,6 +2412,12 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, * TODO - tommath stubs export goes here! */ +/* Tcl_InitSubsystems, see TIP #414 */ + +#ifndef USE_TCL_STUBS + EXTERN const char *Tcl_InitSubsystems(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 2cc55d6..69d3280 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1411,20 +1411,37 @@ 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. * * Side effects: * The absolute pathname for the application is computed and stored to be - * returned later be [info nameofexecutable]. + * returned later by [info nameofexecutable]. * *--------------------------------------------------------------------------- */ +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_PanicProc *panicProc) +{ + Tcl_SetPanicProc(panicProc); + TclInitSubsystems(); + return stubInfo.version; +} + #undef Tcl_FindExecutable void Tcl_FindExecutable( |