Index: generic/nsf.c =================================================================== diff -u -N -r75a78fbf5f0abe57ec568be9f7dbd41836ddf005 -rbab0e883dfc6f44ff62c9d201d05ff56a5491a30 --- generic/nsf.c (.../nsf.c) (revision 75a78fbf5f0abe57ec568be9f7dbd41836ddf005) +++ generic/nsf.c (.../nsf.c) (revision bab0e883dfc6f44ff62c9d201d05ff56a5491a30) @@ -1733,7 +1733,7 @@ * generic/tclObj.c. For cmd epochs>0 we take the conservative approach * not to trust in internal representation and fetch the cmd new. */ -#if TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>6 +#if 0 && TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>6 if (origTypePtr == objPtr->typePtr && Tcl_Command_cmdEpoch(cmd) > 0) { TclFreeIntRep(objPtr); @@ -18844,10 +18844,16 @@ TclDeletesObject(ClientData clientData) { NsfObject *object; Tcl_Interp *interp; - +#if TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>6 + Command *cmdPtr; +#endif + nonnull_assert(clientData != NULL); object = (NsfObject *)clientData; +#if TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>6 + cmdPtr = (Command *)object->id; +#endif /* * TODO: Actually, it seems like a good idea to flag a deletion from Tcl by * setting object->id to NULL. However, we seem to have some dependencies @@ -18870,6 +18876,10 @@ # endif CallStackDestroyObject(interp, object); + +#if TCL_MAJOR_VERSION==8 && TCL_MINOR_VERSION>6 + cmdPtr->cmdEpoch++; +#endif }