Index: generic/nsf.c =================================================================== diff -u -rb337f38c9e541e733674aac902eddb0fe44c0164 -r2f6bcca3537584c8ef1f9fc71b230e79d1560504 --- generic/nsf.c (.../nsf.c) (revision b337f38c9e541e733674aac902eddb0fe44c0164) +++ generic/nsf.c (.../nsf.c) (revision 2f6bcca3537584c8ef1f9fc71b230e79d1560504) @@ -12803,8 +12803,10 @@ ObjStr(paramPtr->nameObj), ObjStr(newValue), result);*/ if (likely(result == TCL_OK)) { - if (paramPtr->flags & NSF_ARG_CMD && RUNTIME_STATE(interp)->doKeepinitcmd) { - Tcl_ObjSetVar2(interp, paramPtr->nameObj, NULL, newValue, TCL_LEAVE_ERR_MSG|TCL_PARSE_PART1); + if (paramPtr->flags & NSF_ARG_CMD && RUNTIME_STATE(interp)->doKeepcmds) { + fprintf(stderr, "setting %s(%s) /%s/\n", ObjStr(NsfGlobalObjs[NSF_ARRAY_CMD]), ObjStr(paramPtr->nameObj), ObjStr(newValue)); + Tcl_ObjSetVar2(interp, NsfGlobalObjs[NSF_ARRAY_CMD], + paramPtr->nameObj, newValue, 0); } } @@ -19245,7 +19247,7 @@ /* cmd configure NsfConfigureCmd { - {-argName "configureoption" -required 1 -type "debug|dtrace|filter|profile|softrecreate|objectsystems|keepinitcmd|checkresults|checkarguments"} + {-argName "configureoption" -required 1 -type "debug|dtrace|filter|profile|softrecreate|objectsystems|keepcmds|checkresults|checkarguments"} {-argName "value" -required 0 -type tclobj} } */ @@ -19258,7 +19260,7 @@ /* TODO: opts copied from tclAPI.h; maybe make global value? */ static CONST char *opts[] = { "debug", "dtrace", "filter", "profile", "softrecreate", - "objectsystems", "keepinitcmd", "checkresults", "checkarguments", NULL}; + "objectsystems", "keepcmds", "checkresults", "checkarguments", NULL}; NSF_DTRACE_CONFIGURE_PROBE((char *)opts[configureoption-1], valueObj ? ObjStr(valueObj) : NULL); } #endif @@ -19346,11 +19348,11 @@ } break; - case ConfigureoptionKeepinitcmdIdx: + case ConfigureoptionKeepcmdsIdx: Tcl_SetBooleanObj(Tcl_GetObjResult(interp), - (RUNTIME_STATE(interp)->doKeepinitcmd)); + (RUNTIME_STATE(interp)->doKeepcmds)); if (valueObj) { - RUNTIME_STATE(interp)->doKeepinitcmd = bool; + RUNTIME_STATE(interp)->doKeepcmds = bool; } break; @@ -22478,7 +22480,7 @@ /* * The "defaultValue" holds the initcmd to be executed */ - Tcl_Obj *varObj = Tcl_ObjGetVar2(interp, NsfGlobalObjs[NSF_INITCMD], + Tcl_Obj *varObj = Tcl_ObjGetVar2(interp, NsfGlobalObjs[NSF_ARRAY_INITCMD], paramPtr->nameObj, 0); // TODO cleanup /*fprintf(stderr, "INITCMD isdefault %d default %s value %p var %p\n", @@ -22490,7 +22492,7 @@ if (varObj == NULL) { /* * The variable is not set. Therefore, we assume, we have to - * execute the initcmd. On success, we note the execution in the NSF_INITCMD + * execute the initcmd. On success, we note the execution in the NSF_ARRAY_INITCMD * variable (usually __initcmd(name)) */ result = ParameterMethodDispatch(interp, object, paramPtr, paramPtr->defaultValue, @@ -22501,7 +22503,7 @@ Nsf_PopFrameObj(interp, framePtr); goto configure_exit; } - Tcl_ObjSetVar2(interp, NsfGlobalObjs[NSF_INITCMD], + Tcl_ObjSetVar2(interp, NsfGlobalObjs[NSF_ARRAY_INITCMD], paramPtr->nameObj, Tcl_NewIntObj(1), 0); }