diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-16 20:32:50 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2013-06-16 20:32:50 (GMT) |
commit | a730cee27c96bd3936c2cebc4bcdbc88cf02f6d0 (patch) | |
tree | c251d8da4f9bb5384a76cea8c7f48989cb9483c5 /generic/tclStubLib.c | |
parent | a568be13ff4f59cf40bccb4a6b35fdb82ea67fb1 (diff) | |
download | tcl-a730cee27c96bd3936c2cebc4bcdbc88cf02f6d0.zip tcl-a730cee27c96bd3936c2cebc4bcdbc88cf02f6d0.tar.gz tcl-a730cee27c96bd3936c2cebc4bcdbc88cf02f6d0.tar.bz2 |
split off TclInitStubTable() as separate function - which does the actual stub table initialization - previously part of Tcl_InitStubs().
FossilOrigin-Name: e04a3d09f8d43eddeddb3f10f94d3d9cbeaddc6a
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r-- | generic/tclStubLib.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 859cbf9..e617515 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -13,16 +13,6 @@ #include "tclInt.h" -MODULE_SCOPE const TclStubs *tclStubsPtr; -MODULE_SCOPE const TclPlatStubs *tclPlatStubsPtr; -MODULE_SCOPE const TclIntStubs *tclIntStubsPtr; -MODULE_SCOPE const TclIntPlatStubs *tclIntPlatStubsPtr; - -const TclStubs *tclStubsPtr = NULL; -const TclPlatStubs *tclPlatStubsPtr = NULL; -const TclIntStubs *tclIntStubsPtr = NULL; -const TclIntPlatStubs *tclIntPlatStubsPtr = NULL; - /* * Use our own isDigit to avoid linking to libc on windows */ @@ -58,7 +48,7 @@ Tcl_InitStubs( { Interp *iPtr = (Interp *) interp; const char *actualVersion = NULL; - ClientData pkgData = NULL; + TclStubInfoType stub; const TclStubs *stubsPtr = iPtr->stubTable; /* @@ -73,7 +63,7 @@ Tcl_InitStubs( return NULL; } - actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData); + actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &stub.data); if (actualVersion == NULL) { return NULL; } @@ -103,18 +93,7 @@ Tcl_InitStubs( } } } - tclStubsPtr = (TclStubs *)pkgData; - - if (tclStubsPtr->hooks) { - tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs; - tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs; - tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs; - } else { - tclPlatStubsPtr = NULL; - tclIntStubsPtr = NULL; - tclIntPlatStubsPtr = NULL; - } - + TclInitStubTable(stub.version); return actualVersion; } |