summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-11-08 15:06:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-11-08 15:06:22 (GMT)
commitbf1e2150cc603698bc042d0552c49930e86b2ca9 (patch)
tree1388f3ebcfabf609d03d25a26693ebf651e4af32 /generic
parent1aafdd134e0b8454e83bc659eeb7f7dd2c5b2006 (diff)
parentd2920bfd03e7f7ef0ffa34289bb959f52fad3fae (diff)
downloadtcl-bf1e2150cc603698bc042d0552c49930e86b2ca9.zip
tcl-bf1e2150cc603698bc042d0552c49930e86b2ca9.tar.gz
tcl-bf1e2150cc603698bc042d0552c49930e86b2ca9.tar.bz2
rebase TIP [http://tip.tcl.tk/414|#414] implementation
Diffstat (limited to 'generic')
-rw-r--r--generic/tcl.h6
-rw-r--r--generic/tclEncoding.c25
2 files changed, 27 insertions, 4 deletions
diff --git a/generic/tcl.h b/generic/tcl.h
index ab54078..1c1df63 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2411,6 +2411,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(