Index: generic/xotcl.c =================================================================== diff -u -r2198228db95e35c248720652c69f53a21eb718e6 -r117b5c8c5af22d5bb38fdb68b5fbd8963f18c697 --- generic/xotcl.c (.../xotcl.c) (revision 2198228db95e35c248720652c69f53a21eb718e6) +++ generic/xotcl.c (.../xotcl.c) (revision 117b5c8c5af22d5bb38fdb68b5fbd8963f18c697) @@ -4631,27 +4631,6 @@ } /* - * seek through the filters active for "obj" and check whether cmdPtr - * is among them - */ -XOTCLINLINE static int -FilterActiveOnObj(Tcl_Interp *interp, XOTclObject *obj, Tcl_Command cmd) { - XOTclCallStack *cs = &RUNTIME_STATE(interp)->cs; - XOTclCallStackContent *bot = cs->content; - register XOTclCallStackContent *csc = cs->top; - while (csc > bot) { - /* only check the callstack entries for this object && - only check the callstack entries for the given cmd */ - if (obj == csc->self && cmd == csc->cmdPtr && - csc->frameType == XOTCL_CSC_TYPE_ACTIVE_FILTER) { - return 1; - } - csc--; - } - return 0; -} - -/* * search through the filter list on obj and class hierarchy * for registration of a command ptr as filter * Index: generic/xotclStack.c =================================================================== diff -u -r2198228db95e35c248720652c69f53a21eb718e6 -r117b5c8c5af22d5bb38fdb68b5fbd8963f18c697 --- generic/xotclStack.c (.../xotclStack.c) (revision 2198228db95e35c248720652c69f53a21eb718e6) +++ generic/xotclStack.c (.../xotclStack.c) (revision 117b5c8c5af22d5bb38fdb68b5fbd8963f18c697) @@ -145,6 +145,26 @@ return NULL; } +/* + * check, if there is an active filters on "obj" using cmd + */ +XOTCLINLINE static int +FilterActiveOnObj(Tcl_Interp *interp, XOTclObject *obj, Tcl_Command cmd) { + XOTclCallStack *cs = &RUNTIME_STATE(interp)->cs; + XOTclCallStackContent *bot = cs->content; + register XOTclCallStackContent *csc = cs->top; + while (csc > bot) { + /* only check the callstack entries for this object && + only check the callstack entries for the given cmd */ + if (obj == csc->self && cmd == csc->cmdPtr && + csc->frameType == XOTCL_CSC_TYPE_ACTIVE_FILTER) { + return 1; + } + csc--; + } + return 0; +} + static void CallStackClearCmdReferences(Tcl_Interp *interp, Tcl_Command cmd) { XOTclCallStack *cs = &RUNTIME_STATE(interp)->cs; Index: generic/xotclStack85.c =================================================================== diff -u -r2198228db95e35c248720652c69f53a21eb718e6 -r117b5c8c5af22d5bb38fdb68b5fbd8963f18c697 --- generic/xotclStack85.c (.../xotclStack85.c) (revision 2198228db95e35c248720652c69f53a21eb718e6) +++ generic/xotclStack85.c (.../xotclStack85.c) (revision 117b5c8c5af22d5bb38fdb68b5fbd8963f18c697) @@ -193,6 +193,25 @@ return NULL; } +/* + * check, if there is an active filters on "obj" using cmd + */ +XOTCLINLINE static int +FilterActiveOnObj(Tcl_Interp *interp, XOTclObject *obj, Tcl_Command cmd) { + register Tcl_CallFrame *varFramePtr = (Tcl_CallFrame *)Tcl_Interp_varFramePtr(interp); + + for (; varFramePtr; varFramePtr = Tcl_CallFrame_callerPtr(varFramePtr)) { + if (Tcl_CallFrame_isProcCallFrame(varFramePtr) & (FRAME_IS_XOTCL_METHOD|FRAME_IS_XOTCL_CMETHOD)) { + XOTclCallStackContent *csc = (XOTclCallStackContent *)Tcl_CallFrame_clientData(varFramePtr); + if (cmd == csc->cmdPtr && obj == csc->self && + csc->frameType == XOTCL_CSC_TYPE_ACTIVE_FILTER) { + return 1; + } + } + } + return 0; +} + static void CallStackClearCmdReferences(Tcl_Interp *interp, Tcl_Command cmd) { register Tcl_CallFrame *varFramePtr = (Tcl_CallFrame *)Tcl_Interp_varFramePtr(interp);