Index: TODO =================================================================== diff -u -r15a93252f0d9d8961ded6fd8f9b610a535ddbdb5 -rce6d76dc0353274665973facb2546678bc7ebd92 --- TODO (.../TODO) (revision 15a93252f0d9d8961ded6fd8f9b610a535ddbdb5) +++ TODO (.../TODO) (revision ce6d76dc0353274665973facb2546678bc7ebd92) @@ -5388,6 +5388,9 @@ - added option "-dependent" to "info subclass" - extended regression test + +nsf.c: +- move NsfMethodNamePath() out of NsfObjWrongArgs() ======================================================================== TODO: Index: generic/nsf.c =================================================================== diff -u -r15a93252f0d9d8961ded6fd8f9b610a535ddbdb5 -rce6d76dc0353274665973facb2546678bc7ebd92 --- generic/nsf.c (.../nsf.c) (revision 15a93252f0d9d8961ded6fd8f9b610a535ddbdb5) +++ generic/nsf.c (.../nsf.c) (revision ce6d76dc0353274665973facb2546678bc7ebd92) @@ -19517,7 +19517,10 @@ assert(interp); assert(objv); - if (objc > 2) return NsfObjWrongArgs(interp, "wrong # args", object->cmdName, objv[0], "?value?"); + if (objc > 2) { + return NsfObjWrongArgs(interp, "wrong # args", object->cmdName, + NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(objv[0])), "?value?"); + } if (object == NULL) return NsfDispatchClientDataError(interp, clientData, "object", ObjStr(objv[0])); if (cd->paramsPtr && objc == 2) { Index: generic/nsfError.c =================================================================== diff -u -ra093703e9836fc152fcbbce96d4f880ace6a6170 -rce6d76dc0353274665973facb2546678bc7ebd92 --- generic/nsfError.c (.../nsfError.c) (revision a093703e9836fc152fcbbce96d4f880ace6a6170) +++ generic/nsfError.c (.../nsfError.c) (revision ce6d76dc0353274665973facb2546678bc7ebd92) @@ -235,7 +235,7 @@ */ int NsfObjWrongArgs(Tcl_Interp *interp, CONST char *msg, Tcl_Obj *cmdName, - Tcl_Obj *methodName, char *arglist) { + Tcl_Obj *methodPath, char *arglist) { int need_space = 0; assert(interp); @@ -248,17 +248,12 @@ need_space = 1; } - if (methodName) { - Tcl_Obj *resultObj; - + if (methodPath) { if (need_space) Tcl_AppendResult(interp, " ", (char *) NULL); - resultObj = NsfMethodNamePath(interp, - NULL /* use topmost frame */, - NsfMethodName(methodName)); - INCR_REF_COUNT(resultObj); - Tcl_AppendResult(interp, ObjStr(resultObj), (char *) NULL); - DECR_REF_COUNT(resultObj); + INCR_REF_COUNT(methodPath); + Tcl_AppendResult(interp, ObjStr(methodPath), (char *) NULL); + DECR_REF_COUNT(methodPath); need_space = 1; } @@ -295,7 +290,9 @@ assert(errorMsg); assert(paramPtr); - NsfObjWrongArgs(interp, errorMsg, cmdNameObj, methodObj, ObjStr(argStringObj)); + NsfObjWrongArgs(interp, errorMsg, cmdNameObj, + NsfMethodNamePath(interp, NULL /* use topmost frame */, NsfMethodName(methodObj)), + ObjStr(argStringObj)); DECR_REF_COUNT2("paramDefsObj", argStringObj); return TCL_ERROR;