Index: generic/nsf.c =================================================================== diff -u -N -rce99d2e545ab2b5677045db1184e80f6bded0dbe -rad4244a23851406ab1f13bb20c1815e1ea5fce76 --- generic/nsf.c (.../nsf.c) (revision ce99d2e545ab2b5677045db1184e80f6bded0dbe) +++ generic/nsf.c (.../nsf.c) (revision ad4244a23851406ab1f13bb20c1815e1ea5fce76) @@ -4381,8 +4381,13 @@ nonnull_assert(osPtr != NULL); for (idx = 0; idx <= NSF_s_set_idx; idx++) { - if (osPtr->methods[idx]) { DECR_REF_COUNT(osPtr->methods[idx]); osPtr->methodNames[idx] = NULL; } - if (osPtr->handles[idx]) { DECR_REF_COUNT(osPtr->handles[idx]); } + if (osPtr->methods[idx]) { + DECR_REF_COUNT(osPtr->methods[idx]); + osPtr->methodNames[idx] = NULL; + } + if (osPtr->handles[idx]) { + DECR_REF_COUNT(osPtr->handles[idx]); + } } if (osPtr->rootMetaClass != NULL && osPtr->rootClass != NULL) { @@ -7401,7 +7406,10 @@ } if (doResetOpt == 1) { - if (valueObj != NULL) { /* we have an entry */ + if (valueObj != NULL) { + /* + * We have such an variable. The reset operation has tun unset it. + */ Tcl_UnsetVar2(interp, NsfGlobalStrings[NSF_AUTONAMES], ObjStr(nameObj), flogs); } resultObj = NsfGlobalObjs[NSF_EMPTY]; @@ -20519,9 +20527,15 @@ nonnull_assert(interp != NULL); switch (level) { - case CALLING_LEVEL: NsfCallStackFindLastInvocation(interp, 1, &framePtr); break; - case ACTIVE_LEVEL: NsfCallStackFindActiveFrame(interp, 1, &framePtr); break; - default: framePtr = NULL; break; /* silence compiler */ + case CALLING_LEVEL: + NsfCallStackFindLastInvocation(interp, 1, &framePtr); + break; + case ACTIVE_LEVEL: + NsfCallStackFindActiveFrame(interp, 1, &framePtr); + break; + default: + framePtr = NULL; + break; /* silence compiler */ } if (framePtr != NULL) { @@ -22866,7 +22880,10 @@ "forward: %%1 contains invalid list '%s'", ObjStr(listObj)); } - } else if (unlikely(tcd->subcommands != NULL)) { /* deprecated part */ + } else if (unlikely(tcd->subcommands != NULL)) { + /* + * This is a deprecated part, kept for backwards compatibility. + */ if (Tcl_ListObjGetElements(interp, tcd->subcommands, &nrElements, &listElements) != TCL_OK) { return NsfForwardPrintError(interp, tcd, objc, objv, "forward: %%1 contains invalid list '%s'", @@ -22992,7 +23009,7 @@ } else { /* - * Evaluate the given command + * Evaluate the given command. */ /*fprintf(stderr, "evaluating '%s'\n", ForwardArgString);*/ result = Tcl_EvalEx(interp, ForwardArgString, -1, 0);