Index: generic/nsf.c =================================================================== diff -u -rf61ee3dfc17d8cf04a0dc9ada9cb0f939514a511 -rabc4e7b7e4192e83072f23bf7849ab3e2b61c09c --- generic/nsf.c (.../nsf.c) (revision f61ee3dfc17d8cf04a0dc9ada9cb0f939514a511) +++ generic/nsf.c (.../nsf.c) (revision abc4e7b7e4192e83072f23bf7849ab3e2b61c09c) @@ -9715,13 +9715,15 @@ tcd->objProc = objProc; tcd->aliasedCmd = cmd; tcd->clientData = Tcl_Command_objClientData(cmd); - */ + + * There is no need to iterate during dereferencing, since the target cmd + * is already dereferenced. + */ cmd = tcd->aliasedCmd; proc = Tcl_Command_objProc(cmd); cp = Tcl_Command_objClientData(cmd); - /* TODO: dereference chain? */ } /*fprintf(stderr, "MethodDispatch method '%s' cmd %p %s clientData %p cp=%p objc=%d cscPtr %p csc->flags %.6x \n", @@ -9775,9 +9777,7 @@ */ return result; - } else if (proc == NsfObjDispatch - /*//&& ((o = NsfGetObjectFromCmdPtr(cmd)) && o->id == cmd && (o->flags & NSF_PER_OBJECT_DISPATCH))*/ - ) { + } else if (proc == NsfObjDispatch) { assert(cp); return ObjectCmdMethodDispatch((NsfObject *)cp, interp, objc, objv, @@ -10302,16 +10302,13 @@ object, methodName, object->nsPtr, cmd, cmd ? ((Command *)cmd)->objProc : NULL);*/ if (cmd) { - //NsfObject *o; - /* * Reject call when * a) trying to call a private method without the local flag or ignore permssions, or * b) trying to call an object with no method interface */ if (((flags & (NSF_CM_LOCAL_METHOD|NSF_CM_IGNORE_PERMISSIONS)) == 0 && (Tcl_Command_flags(cmd) & NSF_CMD_CALL_PRIVATE_METHOD)) - //|| ((o = NsfGetObjectFromCmdPtr(cmd)) && o->id == cmd && (o->flags & NSF_ALLOW_METHOD_DISPATCH) == 0) ) { cmd = NULL; } else { @@ -18793,9 +18790,6 @@ * * 5. arbitrary Tcl commands (e.g. set, ..., ::nsf::relation, ...) * - * TODO GN: i think, we should use NsfProcAliasMethod, whenever the clientData - * is not 0. These are the cases, where the clientData will be freed, - * when the original command is deleted. */ if (withFrame == FrameObjectIdx) {