Index: generic/xotcl.c =================================================================== diff -u -rbc2fe454630ac53d4ea617baa30e4ac93fa8fd30 -r1acec493cc064647962a8c376f1343388b198252 --- generic/xotcl.c (.../xotcl.c) (revision bc2fe454630ac53d4ea617baa30e4ac93fa8fd30) +++ generic/xotcl.c (.../xotcl.c) (revision 1acec493cc064647962a8c376f1343388b198252) @@ -1636,7 +1636,7 @@ /* *---------------------------------------------------------------------- - * MethodObj -- + * XOTclMethodObj -- * * Return the methodObj for a given method index. * @@ -1648,7 +1648,7 @@ * *---------------------------------------------------------------------- */ -Tcl_Obj *MethodObj(Tcl_Interp *interp, XOTclObject *object, int methodIdx) { +Tcl_Obj * XOTclMethodObj(Tcl_Interp *interp, XOTclObject *object, int methodIdx) { XOTclObjectSystem *osPtr = GetObjectSystem(object); return osPtr->methods[methodIdx]; } @@ -6417,7 +6417,7 @@ /* normal dispatch */ result = ObjectDispatch(clientData, interp, objc, objv, 0); } else { - Tcl_Obj *methodObj = MethodObj(interp, (XOTclObject *)clientData, XO_defaultmethod_idx); + Tcl_Obj *methodObj = XOTclMethodObj(interp, (XOTclObject *)clientData, XO_defaultmethod_idx); if (methodObj) { Tcl_Obj *tov[2]; tov[0] = objv[0]; @@ -8637,7 +8637,7 @@ Tcl_ListObjGetElements(interp, resultObj, &nobjc, &nobjv); /* CallDirectly does not make much sense, since init is already defined in predefined */ - methodObj = MethodObj(interp, object, XO_init_idx); + methodObj = XOTclMethodObj(interp, object, XO_init_idx); if (methodObj) { result = callMethod((ClientData) object, interp, methodObj, nobjc+2, nobjv, XOTCL_CM_NO_PROTECT); @@ -12904,7 +12904,7 @@ * the the string representation. */ /*fprintf(stderr, "calling %s objectparameter\n", objectName(object));*/ - Tcl_Obj *methodObj = MethodObj(interp, object, XO_objectparameter_idx); + Tcl_Obj *methodObj = XOTclMethodObj(interp, object, XO_objectparameter_idx); if (methodObj) { result = callMethod((ClientData) object, interp, methodObj, Index: generic/xotclInt.h =================================================================== diff -u -rbc2fe454630ac53d4ea617baa30e4ac93fa8fd30 -r1acec493cc064647962a8c376f1343388b198252 --- generic/xotclInt.h (.../xotclInt.h) (revision bc2fe454630ac53d4ea617baa30e4ac93fa8fd30) +++ generic/xotclInt.h (.../xotclInt.h) (revision 1acec493cc064647962a8c376f1343388b198252) @@ -539,7 +539,6 @@ XOTE_EMPTY, XOTE_ONE, /* methods called internally */ XOTE_CONFIGURE, - XOTE_MOVE, XOTE_RESIDUALARGS, XOTE_UNKNOWN, XOTE___UNKNOWN, /* var names */ @@ -561,7 +560,6 @@ "", "1", /* methods called internally */ "configure", - "move", "residualargs", "unknown", "__unknown", /* var names */ @@ -590,6 +588,7 @@ int XOTclCallCommand(Tcl_Interp *interp, XOTclGlobalNames name, int objc, Tcl_Obj *CONST objv[]); int XOTclShadowTclCommands(Tcl_Interp *interp, XOTclShadowOperations load); +Tcl_Obj * XOTclMethodObj(Tcl_Interp *interp, XOTclObject *object, int methodIdx); /* Index: generic/xotclShadow.c =================================================================== diff -u -r11d5a8a7fab7ba69a94b161bb9c0aae5a2636e7b -r1acec493cc064647962a8c376f1343388b198252 --- generic/xotclShadow.c (.../xotclShadow.c) (revision 11d5a8a7fab7ba69a94b161bb9c0aae5a2636e7b) +++ generic/xotclShadow.c (.../xotclShadow.c) (revision 1acec493cc064647962a8c376f1343388b198252) @@ -85,7 +85,6 @@ XOTcl_RenameObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { /* this call the Tcl_RenameObjCmd, but it ensures before that the renamed obj, functions, etc. are not part of XOTcl */ - XOTclObject *obj = NULL; Tcl_Command cmd; /* wrong # args => normal Tcl ErrMsg*/ @@ -95,10 +94,11 @@ /* if an obj/cl should be renamed => call the XOTcl move method */ cmd = Tcl_FindCommand(interp, ObjStr(objv[1]), (Tcl_Namespace *)NULL,0); if (cmd) { - obj = XOTclGetObjectFromCmdPtr(cmd); - if (obj) { - return XOTclCallMethodWithArgs((ClientData)obj, interp, - XOTclGlobalObjs[XOTE_MOVE], objv[2], 1, 0, 0); + XOTclObject *object = XOTclGetObjectFromCmdPtr(cmd); + Tcl_Obj *methodObj = object ? XOTclMethodObj(interp, object, XO_move_idx) : NULL; + if (object && methodObj) { + return XOTclCallMethodWithArgs((ClientData)object, interp, + methodObj, objv[2], 1, 0, 0); } }