Index: generic/nsf.c =================================================================== diff -u -rdf69a2729a1b835c38c170cb7439240089b86c6e -r97b643b1f8f0d1cb74d8bf1508b29d4b7fdb05c1 --- generic/nsf.c (.../nsf.c) (revision df69a2729a1b835c38c170cb7439240089b86c6e) +++ generic/nsf.c (.../nsf.c) (revision 97b643b1f8f0d1cb74d8bf1508b29d4b7fdb05c1) @@ -21920,12 +21920,12 @@ Tcl_Command importedCmd = GetOriginalCommand(cmd); return ListCmdParams(interp, importedCmd, contextObject, pattern, methodName, NSF_PARAMS_SYNTAX); } + case InfomethodsubcmdPreconditionIdx: - { #if defined(NSF_WITH_ASSERTIONS) - NsfProcAssertion *procs = NULL; - if (regObject) { + NsfProcAssertion *procs = NULL; + if (withPer_object) { if (regObject->opt && regObject->opt->assertions) { procs = AssertionFindProcs(regObject->opt->assertions, methodName); @@ -21940,13 +21940,13 @@ } #endif return TCL_OK; - } + + case InfomethodsubcmdPostconditionIdx: - { #if defined(NSF_WITH_ASSERTIONS) - NsfProcAssertion *procs = NULL; - if (regObject) { + NsfProcAssertion *procs = NULL; + if (withPer_object) { if (regObject->opt && regObject->opt->assertions) { procs = AssertionFindProcs(regObject->opt->assertions, methodName); @@ -21961,7 +21961,7 @@ } #endif return TCL_OK; - } + case InfomethodsubcmdSubmethodsIdx: { Tcl_Command origCmd = GetOriginalCommand(cmd); @@ -22021,25 +22021,23 @@ Tcl_ListObjAppendElement(interp, resultObj, Tcl_GetObjResult(interp)); #if defined(NSF_WITH_ASSERTIONS) - { + if (regObject) { NsfAssertionStore *assertions; - if (regObject) { - if (withPer_object) { - assertions = regObject->opt ? regObject->opt->assertions : NULL; - } else { - NsfClass *class = (NsfClass *)regObject; - assertions = class->opt ? class->opt->assertions : NULL; - } + if (withPer_object) { + assertions = regObject->opt ? regObject->opt->assertions : NULL; + } else { + NsfClass *class = (NsfClass *)regObject; + assertions = class->opt ? class->opt->assertions : NULL; + } - if (assertions) { - NsfProcAssertion *procs = AssertionFindProcs(assertions, methodName); - if (procs) { - Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj("-precondition", -1)); - Tcl_ListObjAppendElement(interp, resultObj, AssertionList(interp, procs->pre)); - Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj("-postcondition", -1)); - Tcl_ListObjAppendElement(interp, resultObj, AssertionList(interp, procs->post)); - } + if (assertions) { + NsfProcAssertion *procs = AssertionFindProcs(assertions, methodName); + if (procs) { + Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj("-precondition", -1)); + Tcl_ListObjAppendElement(interp, resultObj, AssertionList(interp, procs->pre)); + Tcl_ListObjAppendElement(interp, resultObj, Tcl_NewStringObj("-postcondition", -1)); + Tcl_ListObjAppendElement(interp, resultObj, AssertionList(interp, procs->post)); } } } Index: generic/nsfShadow.c =================================================================== diff -u -rdb831678bc92ce4e39bf4ff303f32491a3c4f9d9 -r97b643b1f8f0d1cb74d8bf1508b29d4b7fdb05c1 --- generic/nsfShadow.c (.../nsfShadow.c) (revision db831678bc92ce4e39bf4ff303f32491a3c4f9d9) +++ generic/nsfShadow.c (.../nsfShadow.c) (revision 97b643b1f8f0d1cb74d8bf1508b29d4b7fdb05c1) @@ -231,7 +231,7 @@ */ static int Nsf_RenameObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { - Tcl_Command cmd, parentCmd; + Tcl_Command cmd; if (objc != 3) { /* wrong # args, let Tcl generate the error */ @@ -243,6 +243,8 @@ if (cmd) { NsfObject *object = NsfGetObjectFromCmdPtr(cmd); Tcl_Obj *methodObj = object ? NsfMethodObj(object, NSF_o_move_idx) : NULL; + Tcl_Command parentCmd; + if (object && methodObj) { return NsfCallMethodWithArgs(interp, (Nsf_Object *)object, methodObj, objv[2], 1, 0, NSF_CSC_IMMEDIATE);