Index: generic/nsf.c =================================================================== diff -u -N -rf0f87b41b6bb57a518fc1bc52fd2f3422d7a9b07 -r3916bf00a3787cead96c01851af6cbce4392250b --- generic/nsf.c (.../nsf.c) (revision f0f87b41b6bb57a518fc1bc52fd2f3422d7a9b07) +++ generic/nsf.c (.../nsf.c) (revision 3916bf00a3787cead96c01851af6cbce4392250b) @@ -32964,7 +32964,9 @@ * e.g. overloaded internally called methods like "configure". */ /*fprintf(stderr, "compare object %p == %p\n", (void*)object, (void*)cscPtr->self);*/ - if (cscPtr->self == object) { + if (cscPtr->self == object && + strcmp(osPtr->methodNames[NSF_o_configure_idx], + Tcl_GetCommandName(interp, cscPtr->cmdPtr)) == 0) { invocationFrame = Tcl_CallFrame_callerPtr(invocationFrame); /*fprintf(stderr, "same object, continue with %p\n", (void*)invocationFrame);*/ continue; Index: tests/volatile.test =================================================================== diff -u -N -r8e2e356e9bcef39f43dfe3690b82d9586c7adc72 -r3916bf00a3787cead96c01851af6cbce4392250b --- tests/volatile.test (.../volatile.test) (revision 8e2e356e9bcef39f43dfe3690b82d9586c7adc72) +++ tests/volatile.test (.../volatile.test) (revision 3916bf00a3787cead96c01851af6cbce4392250b) @@ -92,6 +92,37 @@ ::foon } +nx::test case self-context-volatile { + + xotcl::Class create C + xotcl::Class create M + M instproc configure args { + next + } + + + C instproc destroy-after-run {} { + my volatile + + set o2 [xotcl::Object new -volatile] + xotcl::Object instmixin ::M + set o3 [xotcl::Object new -volatile] + xotcl::Object instmixin {} + ? [info commands [self]] [self] + ? [info commands $o2] $o2 + ? [info commands $o3] $o3 + return [list [self] $o2 $o3] + } + + set c [C new] + lassign [$c destroy-after-run] obj1 obj2 obj3 + ? [list info commands $obj1] "" + ? [list info commands $obj2] "" + ? [list info commands $obj3] "" +} + + + # # Local variables: # mode: tcl