summaryrefslogtreecommitdiffstats
path: root/generic/tclLoad.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-08-15 20:27:45 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-08-15 20:27:45 (GMT)
commitf04510bad1aeb454472e2f91558c9904d68d2ee8 (patch)
tree61a6a7ab9222e7b494de13c8dc746ce2e5f88d30 /generic/tclLoad.c
parent65a2dfa017c08a3ea9aa1a0665a71c583374eb46 (diff)
downloadtcl-f04510bad1aeb454472e2f91558c9904d68d2ee8.zip
tcl-f04510bad1aeb454472e2f91558c9904d68d2ee8.tar.gz
tcl-f04510bad1aeb454472e2f91558c9904d68d2ee8.tar.bz2
Allow "tcl8" as library prefix (just as "tcl9" for Tcl 9)
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r--generic/tclLoad.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 10f993b..f89d2fa 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -350,6 +350,9 @@ Tcl_LoadObjCmd(
#endif
) && (pkgGuess[1] == 'c')
&& (pkgGuess[2] == 'l')) {
+ if (pkgGuess[3] == '8') {
+ pkgGuess++;
+ }
pkgGuess += 3;
}
for (p = pkgGuess; *p != 0; p += offset) {
@@ -363,7 +366,7 @@ Tcl_LoadObjCmd(
if (p == pkgGuess) {
Tcl_DecrRefCount(splitPtr);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "couldn't figure out prefix for %s",
+ "cannot figure out prefix for %s",
fullFileName));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD",
"WHATLIBRARY", (char *)NULL);
@@ -459,7 +462,7 @@ Tcl_LoadObjCmd(
if (Tcl_IsSafe(target)) {
if (libraryPtr->safeInitProc == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't use library in a safe interpreter: no"
+ "cannot use library in a safe interpreter: no"
" %s_SafeInit procedure", libraryPtr->prefix));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "UNSAFE",
(char *)NULL);
@@ -470,7 +473,7 @@ Tcl_LoadObjCmd(
} else {
if (libraryPtr->initProc == NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "can't attach library to interpreter: no %s_Init procedure",
+ "cannot attach library to interpreter: no %s_Init procedure",
libraryPtr->prefix));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LOAD", "ENTRYPOINT",
(char *)NULL);