summaryrefslogtreecommitdiffstats
path: root/generic/tclStubLib.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-20 09:36:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-12-20 09:36:50 (GMT)
commitb258cc76aba7c7cb1906d863944bb4cd6ea5d1a4 (patch)
tree9fdbe37405ebe23e1d7e77f2455ac88ab2096bc7 /generic/tclStubLib.c
parent43b22f924faa4963e0238f2191f56270c8d90b81 (diff)
downloadtcl-b258cc76aba7c7cb1906d863944bb4cd6ea5d1a4.zip
tcl-b258cc76aba7c7cb1906d863944bb4cd6ea5d1a4.tar.gz
tcl-b258cc76aba7c7cb1906d863944bb4cd6ea5d1a4.tar.bz2
Record the fact that all stub-enabled extensions work in Tcl 8.5+, no 8.6 (or 9.0) features are needed. (Differences between 8.x and 9.0 are handled by a different stub magic value)
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r--generic/tclStubLib.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index afabdca..dd951bf 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -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;