summaryrefslogtreecommitdiffstats
path: root/generic/tclStubLib.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2007-09-17 14:50:42 (GMT)
committerdgp <dgp@noemail.net>2007-09-17 14:50:42 (GMT)
commit323074d53c3bddb21da02020ec1d8c276033c91a (patch)
tree02776b4d71e3ead075f236772f6f91ef36a9956f /generic/tclStubLib.c
parentb3d340fef97bc20de4e8067792cccf1b6a374aaa (diff)
downloadtcl-323074d53c3bddb21da02020ec1d8c276033c91a.zip
tcl-323074d53c3bddb21da02020ec1d8c276033c91a.tar.gz
tcl-323074d53c3bddb21da02020ec1d8c276033c91a.tar.bz2
* generic/tcl.h: Revised Tcl_InitStubs() to restore Tcl 8.4
* generic/tclPkg.c: source compatibility with callers of * generic/tclStubLib.c: Tcl_InitStubs(interp, TCL_VERSION, 1). [Bug 1578344]. FossilOrigin-Name: 99a55f90cc74c5e61be1890fecd57fefc4dd2b7b
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r--generic/tclStubLib.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index 5389cfc..be2a1fa 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubLib.c,v 1.15 2007/05/16 18:28:40 jenglish Exp $
+ * RCS: @(#) $Id: tclStubLib.c,v 1.16 2007/09/17 14:50:44 dgp Exp $
*/
/*
@@ -95,10 +95,28 @@ Tcl_InitStubs(
return NULL;
}
- actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, exact, &pkgData);
+ actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData);
if (actualVersion == NULL) {
return NULL;
}
+ if (exact) {
+ CONST char *p = version;
+ int count = 0;
+
+ while (*p) {
+ count += !isdigit(*p++);
+ }
+ if (count == 1) {
+ if (0 != strncmp(version, actualVersion, strlen(version))) {
+ return NULL;
+ }
+ } else {
+ actualVersion = Tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ if (actualVersion == NULL) {
+ return NULL;
+ }
+ }
+ }
tclStubsPtr = (TclStubs*)pkgData;
if (tclStubsPtr->hooks) {