diff options
author | dkf <dkf@noemail.net> | 2009-11-27 06:33:38 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2009-11-27 06:33:38 (GMT) |
commit | 31453f30731c6c5a4c1ddc7ca6ffb0e5af3d5022 (patch) | |
tree | a8cb0e0fd6a6503fbcb3dbd1f10132869fe916b4 /generic/tclOOBasic.c | |
parent | 9aede23a4fe4299fcf68b546e10d4a73357b555e (diff) | |
download | tcl-31453f30731c6c5a4c1ddc7ca6ffb0e5af3d5022.zip tcl-31453f30731c6c5a4c1ddc7ca6ffb0e5af3d5022.tar.gz tcl-31453f30731c6c5a4c1ddc7ca6ffb0e5af3d5022.tar.bz2 |
[Bug 2903811]: Remove unneeded restrictions on usefully calling the
oo::object->variable method. Leaving it hidden is enough.
FossilOrigin-Name: 8666033e45695f4698cd9be61fc75034226534c1
Diffstat (limited to 'generic/tclOOBasic.c')
-rw-r--r-- | generic/tclOOBasic.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/generic/tclOOBasic.c b/generic/tclOOBasic.c index f6e4542..e064928 100644 --- a/generic/tclOOBasic.c +++ b/generic/tclOOBasic.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclOOBasic.c,v 1.19 2009/10/22 15:39:58 dkf Exp $ + * RCS: @(#) $Id: tclOOBasic.c,v 1.20 2009/11/27 06:33:40 dkf Exp $ */ #ifdef HAVE_CONFIG_H @@ -474,12 +474,12 @@ TclOO_Object_LinkVar( } /* - * Do nothing if we are not called from the body of a method. In this - * respect, we are like the [global] command. + * A sanity check. Shouldn't ever happen. (This is all that remains of a + * more complex check inherited from [global] after we have applied the + * fix for [Bug 2903811]; note that the fix involved *removing* code.) */ - if (iPtr->varFramePtr == NULL || - !(iPtr->varFramePtr->isProcCallFrame & FRAME_IS_METHOD)) { + if (iPtr->varFramePtr == NULL) { return TCL_OK; } @@ -505,9 +505,7 @@ TclOO_Object_LinkVar( * would only work if the caller was a method of the object itself, * which might not be true if the method was exported. This is a bit * of a hack, but the simplest way to do this (pushing a stack frame - * would be horribly expensive by comparison). We never have to worry - * about the case where we're dealing with the global namespace; we've - * already checked that we are inside a method. + * would be horribly expensive by comparison). */ savedNsPtr = iPtr->varFramePtr->nsPtr; |