diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-26 13:58:53 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-03-26 13:58:53 (GMT) |
commit | 555d9b42ae752e2209d03200ccfd44be8b394e42 (patch) | |
tree | 5ee9f7decadfe7132055043cc0fbbf37611f951d /generic | |
parent | 0f7738a13cb65627117c5c372833154722bdd48f (diff) | |
download | tcl-555d9b42ae752e2209d03200ccfd44be8b394e42.zip tcl-555d9b42ae752e2209d03200ccfd44be8b394e42.tar.gz tcl-555d9b42ae752e2209d03200ccfd44be8b394e42.tar.bz2 |
Add TCL_INIT_STUFF
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 1 | ||||
-rw-r--r-- | generic/tclEncoding.c | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 4049c8a..9325bf2 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2412,6 +2412,7 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, /* Tcl_InitSubsystems, see TIP #414 */ #define TCL_INIT_PANIC (1) /* Set Panic proc */ +#define TCL_INIT_STUFF (2) /* Do any stuff before initializing the encoding */ EXTERN Tcl_Interp *Tcl_InitSubsystems(int flags, ...); diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 0ffc481..753222f 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1451,9 +1451,14 @@ Tcl_InitSubsystems(int flags, ...) if (flags & TCL_INIT_PANIC) { Tcl_SetPanicProc(va_arg(argList, Tcl_PanicProc *)); } + TclInitSubsystems(); + if (flags & TCL_INIT_STUFF) { + ClientData clientData = va_arg(argList, ClientData); + void (*fn)() = va_arg(argList, void (*)(ClientData)); + fn(clientData); + } va_end(argList); - TclInitSubsystems(); TclpSetInitialEncodings(); TclpFindExecutable(NULL); return (Tcl_Interp *) &dummyInterp; |