Index: TODO =================================================================== diff -u -rdc9120981daa00d27f8639ea98a71efc2078e0e8 -r833cb4b2fb84ddf0aebfc134be2013119c6f668d --- TODO (.../TODO) (revision dc9120981daa00d27f8639ea98a71efc2078e0e8) +++ TODO (.../TODO) (revision 833cb4b2fb84ddf0aebfc134be2013119c6f668d) @@ -4825,6 +4825,11 @@ serializer: - restore traces after object-serialize +nsf.c: +- fix stub provisioning for Tcl 8.6 +- reduce verbosity for FreeUnsetTraceVariable +- return TCL_OK, even when FreeUnsetTraceVariable() fails (warning stays) + ======================================================================== TODO: Index: generic/nsf.c =================================================================== diff -u -rbb72efa672030199bfaecff1cc829dfd802a28d8 -r833cb4b2fb84ddf0aebfc134be2013119c6f668d --- generic/nsf.c (.../nsf.c) (revision bb72efa672030199bfaecff1cc829dfd802a28d8) +++ generic/nsf.c (.../nsf.c) (revision 833cb4b2fb84ddf0aebfc134be2013119c6f668d) @@ -14926,8 +14926,9 @@ static int UnsetInAllNamespaces(Tcl_Interp *interp, Tcl_Namespace *nsPtr, CONST char *name) { int rc = 0; - fprintf(stderr, "### UnsetInAllNamespaces variable '%s', current namespace '%s'\n", - name, nsPtr ? nsPtr->fullName : "NULL"); + + /*fprintf(stderr, "### UnsetInAllNamespaces variable '%s', current namespace '%s'\n", + name, nsPtr ? nsPtr->fullName : "NULL");*/ if (nsPtr) { Tcl_HashSearch search; @@ -14976,7 +14977,7 @@ * variable here which will cause a destroy via var trace, which in turn * clears the volatileVarName flag. */ - /*fprintf(stderr, "### FreeUnsetTraceVariable %s\n", obj->opt->volatileVarName);*/ + /* fprintf(stderr, "### FreeUnsetTraceVariable %s\n", object->opt->volatileVarName);*/ result = Tcl_UnsetVar2(interp, object->opt->volatileVarName, NULL, 0); if (result != TCL_OK) { @@ -14986,14 +14987,18 @@ if (UnsetInAllNamespaces(interp, nsPtr, object->opt->volatileVarName) == 0) { fprintf(stderr, "### don't know how to delete variable '%s' of volatile object\n", object->opt->volatileVarName); + /* + * Return always success, since an error during destroy does not + * help at all + */ } } } - if (result == TCL_OK) { - /*fprintf(stderr, "### success unset\n");*/ - } + /*fprintf(stderr, "### FreeUnsetTraceVariable returns %d OK %d\n", result, TCL_OK);*/ + } - return result; + + return TCL_OK; } static char * @@ -15005,7 +15010,7 @@ char *resultMsg = NULL; /*fprintf(stderr, "NsfUnsetTrace %s flags %.4x %.4x\n", name, flags, - flags & TCL_INTERP_DESTROYED); **/ + flags & TCL_INTERP_DESTROYED);*/ if ((flags & TCL_INTERP_DESTROYED) == 0) { if (GetObjectFromObj(interp, objPtr, &object) == TCL_OK) { @@ -20025,7 +20030,7 @@ } #endif - /*fprintf(stderr, "+++ call tcl-defined exit handler\n"); */ + /*fprintf(stderr, "+++ call tcl-defined exit handler\n");*/ /* * Evaluate user-defined exit handler. @@ -20040,6 +20045,7 @@ ObjectSystemsCleanup(interp, withKeepvars); + #ifdef DO_CLEANUP { NsfRuntimeState *rst = RUNTIME_STATE(interp);