summaryrefslogtreecommitdiffstats
path: root/generic/tclStubLib.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-17 17:37:48 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-17 17:37:48 (GMT)
commitb549908df2d5c9b0dba0a55f14c53f2052afeb4b (patch)
treebd019667a72a0afddfe022d9473738d383c78fe1 /generic/tclStubLib.c
parent9bf0f01d3d518909dba4fddd22b5eefdad229a83 (diff)
parent9e89327bdf29379e7d2ca6af75ffad273e8babba (diff)
downloadtcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.zip
tcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.tar.gz
tcl-b549908df2d5c9b0dba0a55f14c53f2052afeb4b.tar.bz2
Merge 9.0
Diffstat (limited to 'generic/tclStubLib.c')
-rw-r--r--generic/tclStubLib.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index dbc9d40..32ca1f1 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -4,8 +4,8 @@
* Stub object that will be statically linked into extensions that want
* to access Tcl.
*
- * Copyright (c) 1998-1999 by Scriptics Corporation.
- * Copyright (c) 1998 Paul Duffin.
+ * Copyright © 1998-1999 Scriptics Corporation.
+ * Copyright © 1998 Paul Duffin.
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -56,10 +56,11 @@ Tcl_InitStubs(
int exact,
int magic)
{
- Interp *iPtr = (Interp *) interp;
+ Interp *iPtr = (Interp *)interp;
const char *actualVersion = NULL;
ClientData pkgData = NULL;
const TclStubs *stubsPtr = iPtr->stubTable;
+ const char *tclName = (((exact&0xFF00) >= 0x900) ? "tcl" : "Tcl");
/*
* We can't optimize this check by caching tclStubsPtr because that
@@ -73,7 +74,7 @@ Tcl_InitStubs(
return NULL;
}
- actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData);
+ actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 0, &pkgData);
if (actualVersion == NULL) {
return NULL;
}
@@ -93,11 +94,11 @@ Tcl_InitStubs(
}
if (*p || ISDIGIT(*q)) {
/* Construct error message */
- stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL);
return NULL;
}
} else {
- actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 1, NULL);
+ actualVersion = stubsPtr->tcl_PkgRequireEx(interp, tclName, version, 1, NULL);
if (actualVersion == NULL) {
return NULL;
}