From f04510bad1aeb454472e2f91558c9904d68d2ee8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 15 Aug 2024 20:27:45 +0000 Subject: Allow "tcl8" as library prefix (just as "tcl9" for Tcl 9) --- generic/tclLoad.c | 9 ++++++--- 1 file 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); -- cgit v0.12