summaryrefslogtreecommitdiffstats
path: root/generic/tclOOBasic.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-11-27 06:33:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-11-27 06:33:39 (GMT)
commit26dda484fe7ad621e71585270c0a3c914c5fb375 (patch)
treea8cb0e0fd6a6503fbcb3dbd1f10132869fe916b4 /generic/tclOOBasic.c
parentdc3b82e5c4fef5b8efbdcef11cfc05216d88cc0c (diff)
downloadtcl-26dda484fe7ad621e71585270c0a3c914c5fb375.zip
tcl-26dda484fe7ad621e71585270c0a3c914c5fb375.tar.gz
tcl-26dda484fe7ad621e71585270c0a3c914c5fb375.tar.bz2
[Bug 2903811]: Remove unneeded restrictions on usefully calling the
oo::object->variable method. Leaving it hidden is enough.
Diffstat (limited to 'generic/tclOOBasic.c')
-rw-r--r--generic/tclOOBasic.c14
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;