Index: generic/xotclStack.c =================================================================== diff -u -rd8cfbde70910574be327e506ba621cb3845e5cef -r2198228db95e35c248720652c69f53a21eb718e6 --- generic/xotclStack.c (.../xotclStack.c) (revision d8cfbde70910574be327e506ba621cb3845e5cef) +++ generic/xotclStack.c (.../xotclStack.c) (revision 2198228db95e35c248720652c69f53a21eb718e6) @@ -87,7 +87,7 @@ } static void -CallStackUseActiveFrames(Tcl_Interp *interp, callFrameContext *ctx, int i) { +CallStackUseActiveFrames(Tcl_Interp *interp, callFrameContext *ctx) { XOTclCallStackContent *active, *top; Tcl_CallFrame *inFramePtr = (Tcl_CallFrame *)Tcl_Interp_varFramePtr(interp), *varFramePtr, *activeFramePtr, *framePtr; @@ -132,7 +132,19 @@ } } +static XOTclCallStackContent * +CallStackFindActiveFilter(Tcl_Interp *interp) { + XOTclCallStack *cs = &RUNTIME_STATE(interp)->cs; + register XOTclCallStackContent *csc; + /* search for first active frame and set tcl frame pointers */ + for (csc=cs->top; csc > cs->content; csc --) { + if (csc->frameType == XOTCL_CSC_TYPE_ACTIVE_FILTER) return csc; + } + /* for some reasons, we could not find invocation (topLevel, destroy) */ + return NULL; +} + static void CallStackClearCmdReferences(Tcl_Interp *interp, Tcl_Command cmd) { XOTclCallStack *cs = &RUNTIME_STATE(interp)->cs;