From a67fa65469d8d1eaf3285595fccce2898315a226 Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 4 Sep 2024 20:05:29 +0000 Subject: [PATCH] Workaround of the incompatibility in Tcl_NewObjectInstance() in Tcl 8.6.15. (See Tcl Ticket 154f0982f2) Without this workaround, Itcl Bug d0126511d9 re-emerges. I don't think this is a real solution, but it silences the Itcl test suite. I think the interface between Itcl 4 and Tcl is cursed to be forever secretly broken outside narrow ranges of use, which fortunately cover a large space of utility. A vote of confidence from another Tcler before merge to Itcl trunk would be appreciated. --- generic/itclClass.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generic/itclClass.c b/generic/itclClass.c index e8fea3c4..62158b6f 100644 --- a/generic/itclClass.c +++ b/generic/itclClass.c @@ -150,8 +150,9 @@ CallNewObjectInstance( *oPtr = NULL; if (infoPtr->clazzClassPtr) { - *oPtr = Tcl_NewObjectInstance(interp, infoPtr->clazzClassPtr, - path, path, 0, NULL, 0); + *oPtr = Tcl_NewObjectInstance(interp, infoPtr->clazzClassPtr, path, + Tcl_FindNamespace(interp, path, NULL, 0) ? NULL : path, + 0, NULL, 0); } if (*oPtr == NULL) { Tcl_AppendResult(interp,