Skip to content

Commit

Permalink
Workaround of the incompatibility in Tcl_NewObjectInstance() in Tcl 8…
Browse files Browse the repository at this point in the history
….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.
  • Loading branch information
dgp committed Sep 4, 2024
1 parent ba392e5 commit a67fa65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generic/itclClass.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a67fa65

Please sign in to comment.