summaryrefslogtreecommitdiffstats
path: root/generic/tclStubLib.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-25 09:12:32 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-01-25 09:12:32 (GMT)
commitf09de888df51736f6e35a190ee1eef87b39048cf (patch)
tree93d71e0e3d9c75d1e0a055d9fb0c61a59c950344 /generic/tclStubLib.c
parent51db664c7d3fa5bc0a1c216ac3ee89c1eeba6f09 (diff)
parentee29bbd769ed711e5e7faa7c838d23a8092cc3d1 (diff)
downloadtcl-f09de888df51736f6e35a190ee1eef87b39048cf.zip
tcl-f09de888df51736f6e35a190ee1eef87b39048cf.tar.gz
tcl-f09de888df51736f6e35a190ee1eef87b39048cf.tar.bz2
Merge trunk
Rename TclInitStubs back to Tcl_InitStubs, for easier compatibility with Tcl 8.
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r--generic/tclStubLib.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index eefa300..cadb7b9 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -32,7 +32,7 @@ const TclIntPlatStubs *tclIntPlatStubsPtr = NULL;
/*
*----------------------------------------------------------------------
*
- * TclInitStubs --
+ * Tcl_InitStubs --
*
* Tries to initialise the stub table pointers and ensures that the
* correct version of Tcl is loaded.
@@ -48,7 +48,7 @@ const TclIntPlatStubs *tclIntPlatStubsPtr = NULL;
*/
#undef Tcl_InitStubs
MODULE_SCOPE const char *
-TclInitStubs(
+Tcl_InitStubs(
Tcl_Interp *interp,
const char *version,
int exact,
@@ -76,7 +76,7 @@ TclInitStubs(
if (actualVersion == NULL) {
return NULL;
}
- if (exact) {
+ if (exact&1) {
const char *p = version;
int count = 0;
@@ -102,7 +102,14 @@ TclInitStubs(
}
}
}
- tclStubsPtr = (TclStubs *)pkgData;
+
+ if (stubsPtr->reserved77) {
+ /* We are running Tcl 8. Do some additional checks here. */
+ tclStubsPtr = (TclStubs *)pkgData;
+ } else {
+ /* We are running Tcl 9. Do some additional checks here. */
+ tclStubsPtr = stubsPtr;
+ }
if (tclStubsPtr->hooks) {
tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;