From 6a1e109b2fe4811e8e08298871c34c690e1cf72f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 11 Apr 2025 16:26:36 +0000 Subject: Fix for [fd8341e496]: Tcl_InitStubs compatibility for 9.1 --- changes | 2 ++ generic/tclStubLib.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/changes b/changes index 84760f3..65a5678 100644 --- a/changes +++ b/changes @@ -9390,3 +9390,5 @@ Many code fixes to avoid overflow or undefined behavior. Thanks chrstphrchvz. 2025-01-19 tzdata updated to Olson's tzdata2025a (nijtmans) 2025-03-23 tzdata updated to Olson's tzdata2025b (nijtmans) + +2025-04-1 (bug) [fd8341] Tcl_InitStubs compatibility for 9.1, better error-handling (nijtmans) diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index 7bd6109..ec3c883 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -84,6 +84,9 @@ Tcl_InitStubs( actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData); if (actualVersion == NULL) { + /* Even when the Tcl version does not match, the caller should at least be + * able to use Tcl_GetObjResult/Tcl_GetString/Tcl_Panic for error-handling */ + tclStubsPtr = stubsPtr; /* See: [fd8341e496] */ return NULL; } if (exact&1) { -- cgit v0.12