summaryrefslogtreecommitdiffstats
path: root/generic/tclStubLib.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-13 10:00:43 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-13 10:00:43 (GMT)
commitb9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034 (patch)
tree69d60a122f7e49529a41dbbbff1a808319dc1318 /generic/tclStubLib.c
parente1bed6530aea1d09e8256dd2fa27f5682d04a72e (diff)
parent9f8e844f9c423ce1ff450461016db86873db4a45 (diff)
downloadtcl-b9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034.zip
tcl-b9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034.tar.gz
tcl-b9e6ad8c30d7f7b336d09a55bfa1fbcf0ad6d034.tar.bz2
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r--generic/tclStubLib.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index afabdca..5261591 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -67,7 +67,7 @@ Tcl_InitStubs(
if (!stubsPtr || (stubsPtr->magic != (((exact&0xff00) >= 0x900) ? magic : TCL_STUB_MAGIC))) {
iPtr->result = (char *)"interpreter uses an incompatible stubs mechanism";
- iPtr->freeProc = TCL_STATIC;
+ iPtr->freeProc = 0;
return NULL;
}
@@ -101,12 +101,16 @@ Tcl_InitStubs(
}
}
}
- tclStubsPtr = (TclStubs *)pkgData;
+ if (((exact&0xff00) < 0x900)) {
+ /* We are running Tcl 8.x */
+ stubsPtr = (TclStubs *)pkgData;
+ }
+ tclStubsPtr = stubsPtr;
- if (tclStubsPtr->hooks) {
- tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs;
- tclIntStubsPtr = tclStubsPtr->hooks->tclIntStubs;
- tclIntPlatStubsPtr = tclStubsPtr->hooks->tclIntPlatStubs;
+ if (stubsPtr->hooks) {
+ tclPlatStubsPtr = stubsPtr->hooks->tclPlatStubs;
+ tclIntStubsPtr = stubsPtr->hooks->tclIntStubs;
+ tclIntPlatStubsPtr = stubsPtr->hooks->tclIntPlatStubs;
} else {
tclPlatStubsPtr = NULL;
tclIntStubsPtr = NULL;