Index: Makefile.in =================================================================== diff -u -r17ba2f1d86be4afd497d652b7ee39a5edc771a22 -r17880e63ccb02577a5c856aaa6344cd83028a07b --- Makefile.in (.../Makefile.in) (revision 17ba2f1d86be4afd497d652b7ee39a5edc771a22) +++ Makefile.in (.../Makefile.in) (revision 17880e63ccb02577a5c856aaa6344cd83028a07b) @@ -404,6 +404,7 @@ $(TCLSH) $(src_test_dir_native)/info-method.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/submethods.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/disposition.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) + $(TCLSH) $(src_test_dir_native)/volatile.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/parameters.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/returns.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) $(TCLSH) $(src_test_dir_native)/method-require.test -libdir $(PLATFORM_DIR) $(TESTFLAGS) Index: TODO =================================================================== diff -u -r551a41a1d6502070f966b5f0be2559cf3fe12804 -r17880e63ccb02577a5c856aaa6344cd83028a07b --- TODO (.../TODO) (revision 551a41a1d6502070f966b5f0be2559cf3fe12804) +++ TODO (.../TODO) (revision 17880e63ccb02577a5c856aaa6344cd83028a07b) @@ -3016,7 +3016,15 @@ * provided flags to VarExists instead of multiple args * don't add new pointer entries in Nsf_PointerTypeLookup() +- preliminary fix for volatile called through redsidual args +- new regression test file volatile.test + + TODO: + +- fix the comparison with "unknown" in residual args + (2 places marked with "//yyyy" ) + - extend mongo::gridfs::store_file with a switch -metadata to pass metadata together at gridfs file creation time Index: generic/nsf.c =================================================================== diff -u -r551a41a1d6502070f966b5f0be2559cf3fe12804 -r17880e63ccb02577a5c856aaa6344cd83028a07b --- generic/nsf.c (.../nsf.c) (revision 551a41a1d6502070f966b5f0be2559cf3fe12804) +++ generic/nsf.c (.../nsf.c) (revision 17880e63ccb02577a5c856aaa6344cd83028a07b) @@ -14823,10 +14823,12 @@ * Provide warnings for double-settings. */ if (pcPtr->flags[j] & NSF_ARG_SET) { - NsfLog(interp, NSF_LOG_WARN, "Non-positional parameter %s was passed more than once (%s%s%s)", + Tcl_Obj *cmdLineObj = Tcl_NewListObj(objc-1, objv+1); + NsfLog(interp, NSF_LOG_WARN, "Non-positional parameter %s was passed more than once (%s%s%s %s)", nppPtr->name, object ? ObjectName(object) : "", object ? " method " : "", - ObjStr(procNameObj)); + ObjStr(procNameObj), ObjStr(cmdLineObj)); + DECR_REF_COUNT(cmdLineObj); } pcPtr->flags[j] |= NSF_ARG_SET; @@ -18881,8 +18883,9 @@ * does not use this as a base frame, and methods like * activelevel ignore it. */ + //yyyy cscPtr->frameType = NSF_CSC_TYPE_INACTIVE; - + /* * If "method=" was given, use it as method name */ @@ -19261,6 +19264,28 @@ CONST char *methodName, *nextMethodName, *initString = NULL; Tcl_Obj **argv, **nextArgv; + //yyyy + CallFrame *savedVarFramePtr = Tcl_Interp_varFramePtr(interp); + CallFrame *callerPtr = savedVarFramePtr->callerPtr; + if (callerPtr->callerPtr) { callerPtr = callerPtr->callerPtr;} + + // We seem to have problems in cases, -volatile is called via unknown + // TODO: fixme, the comparison with "unknown" can't be the solution + if ((Tcl_CallFrame_isProcCallFrame(callerPtr) & FRAME_IS_NSF_METHOD)) { + NsfCallStackContent *cscPtr = (NsfCallStackContent *)Tcl_CallFrame_clientData(callerPtr); + CONST char *methodName = cscPtr && cscPtr->cmdPtr ? Tcl_GetCommandName(interp, cscPtr->cmdPtr) : ""; + if (strcmp(methodName, "unknown") == 0) { + //fprintf(stderr, "ONE MORE\n"); + if (callerPtr->callerPtr) { callerPtr = callerPtr->callerPtr;} + } + } + + callerPtr = (CallFrame *)CallStackGetActiveProcFrame((Tcl_CallFrame *)callerPtr); + + //fprintf(stderr, "CHANGE FRAME to %p\n", callerPtr); + //NsfShowStack(interp); + Tcl_Interp_varFramePtr(interp) = callerPtr; + #if 0 fprintf(stderr, "NsfOResidualargsMethod %s %2d ",ObjectName(object), objc); for(i=0; i