Index: generic/xotcl.c =================================================================== diff -u -rafa1cb8064311ef406ae50c499c026c8576393f8 -r3820f18dd18f32ee2a7c1fec96f33befc4fefc95 --- generic/xotcl.c (.../xotcl.c) (revision afa1cb8064311ef406ae50c499c026c8576393f8) +++ generic/xotcl.c (.../xotcl.c) (revision 3820f18dd18f32ee2a7c1fec96f33befc4fefc95) @@ -8867,13 +8867,13 @@ */ for (framePtr = nonXotclObjectProcFrame((Tcl_CallFrame *)Tcl_Interp_varFramePtr(interp)); framePtr; - framePtr = nonXotclObjectProcFrame(Tcl_CallFrame_callerVarPtr(framePtr))) { + framePtr = Tcl_CallFrame_callerVarPtr(framePtr)) { nsPtr = Tcl_CallFrame_nsPtr(framePtr); if (isRootNamespace(interp, nsPtr)) { - /* fprintf(stderr, "... %p skip %s\n", framePtr, nsPtr->fullName); */ + /*fprintf(stderr, "... %p skip %s\n", framePtr, nsPtr->fullName);*/ continue; } - /* fprintf(stderr, "... %p take %s\n", framePtr, nsPtr->fullName); */ + /*fprintf(stderr, "... %p take %s\n", framePtr, nsPtr->fullName); */ break; } @@ -9229,7 +9229,7 @@ return ArgumentError(interp, "not enough arguments:", paramPtr, NULL, procNameObj); /* for methods and cmds */ } if (!pc->varArgs && objc-nrDashdash-1 > nrReq + nrOpt) { - return ArgumentError(interp, "to many arguments:", paramPtr, NULL, procNameObj); /* for methods and cmds */ + return ArgumentError(interp, "too many arguments:", paramPtr, NULL, procNameObj); /* for methods and cmds */ } return ArgumentDefaults(pc, interp, paramPtr, nrParams); @@ -11027,8 +11027,8 @@ result = callMethod((ClientData) obj, interp, paramPtr->nameObj, 2+(paramPtr->nrArgs), &newValue, 0); } - fprintf(stderr, "XOTclOConfigureMethod_ attribute %s evaluated %s => (%d)\n", - ObjStr(paramPtr->nameObj), ObjStr(newValue), result); + /*fprintf(stderr, "XOTclOConfigureMethod_ attribute %s evaluated %s => (%d)\n", + ObjStr(paramPtr->nameObj), ObjStr(newValue), result);*/ if (result != TCL_OK) { XOTcl_PopFrame(interp, obj); parseContextRelease(&pc); @@ -11047,7 +11047,6 @@ Tcl_ObjSetVar2(interp, paramPtr->nameObj, NULL, newValue, TCL_LEAVE_ERR_MSG|TCL_PARSE_PART1); } } - XOTcl_PopFrame(interp, obj); remainingArgsc = pc.objc - paramDefs->nrParams; @@ -11506,7 +11505,7 @@ if (Tcl_SetVar2(interp, vn, NULL, fullName, 0)) { XOTclObjectOpt *opt = XOTclRequireObjectOpt(obj); - /*fprintf(stderr, "### setting trace for %s\n", fullName);*/ + /*fprintf(stderr, "### setting trace for %s on frame %p\n", fullName, Tcl_Interp_varFramePtr(interp));*/ result = Tcl_TraceVar(interp, vn, TCL_TRACE_UNSETS, (Tcl_VarTraceProc*)XOTclUnsetTrace, (ClientData)o); Index: generic/xotclStack85.c =================================================================== diff -u -rdfcec445642ff230e91b3b087322ca02a2cdcceb -r3820f18dd18f32ee2a7c1fec96f33befc4fefc95 --- generic/xotclStack85.c (.../xotclStack85.c) (revision dfcec445642ff230e91b3b087322ca02a2cdcceb) +++ generic/xotclStack85.c (.../xotclStack85.c) (revision 3820f18dd18f32ee2a7c1fec96f33befc4fefc95) @@ -38,8 +38,9 @@ /* never return an inactive method frame */ if (!(((XOTclCallStackContent *)Tcl_CallFrame_clientData(framePtr))->frameType & XOTCL_CSC_TYPE_INACTIVE)) break; } else { - if ((flag & (FRAME_IS_XOTCL_OBJECT|FRAME_IS_XOTCL_CMETHOD)) == 0) break; - if (flag & FRAME_IS_PROC) break; + if (flag & FRAME_IS_XOTCL_OBJECT) continue; + /*if ((flag & (FRAME_IS_XOTCL_OBJECT|FRAME_IS_XOTCL_CMETHOD)) == 0) break;*/ + if (flag == 0 || flag & FRAME_IS_PROC) break; } } return framePtr; @@ -164,6 +165,7 @@ *varFramePtr, *activeFramePtr, *framePtr; XOTclCallStackFindActiveFrame(interp, 0, &activeFramePtr); + /*tcl85showStack(interp);*/ # if defined(TCL85STACK_TRACE) tcl85showStack(interp); # endif @@ -191,14 +193,15 @@ /* The active framePtr is an entry deeper in the stack. When XOTcl is interleaved with Tcl, we return the Tcl frame */ - /* fprintf(stderr,"active == deeper, use Tcl frame\n"); */ + /*fprintf(stderr,"active == deeper, use Tcl frame\n"); */ for (framePtr = varFramePtr; framePtr && framePtr != activeFramePtr; framePtr = Tcl_CallFrame_callerPtr(framePtr)) { if ((Tcl_CallFrame_isProcCallFrame(framePtr) & (FRAME_IS_XOTCL_METHOD|FRAME_IS_XOTCL_CMETHOD)) == 0) { break; } } } + if (inFramePtr == framePtr) { /* call frame pointers are fine */ /*fprintf(stderr, "... no need to save frames\n");*/ Index: tests/testx.xotcl =================================================================== diff -u -rc11ab22190bdfe6231b454e9969b6ffafb547f9c -r3820f18dd18f32ee2a7c1fec96f33befc4fefc95 --- tests/testx.xotcl (.../testx.xotcl) (revision c11ab22190bdfe6231b454e9969b6ffafb547f9c) +++ tests/testx.xotcl (.../testx.xotcl) (revision 3820f18dd18f32ee2a7c1fec96f33befc4fefc95) @@ -3938,7 +3938,7 @@ catch { o y 4 56 5 } m - errorCheck $m {to many arguments: should be "y ?-x arg? ?-a arg? a b"} "wrong \# check 1" + errorCheck $m {too many arguments: should be "y ?-x arg? ?-a arg? a b"} "wrong \# check 1" catch { o y } m