summaryrefslogtreecommitdiffstats
path: root/generic/tclOOCall.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-03-26 12:51:15 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-03-26 12:51:15 (GMT)
commitd23835257d7cdbf7c914e23117f34386a03420f4 (patch)
tree1db6e1428e872a9de7d6e17956bad4dcfeeba688 /generic/tclOOCall.c
parent1ca58edee5cf1e80b4755b2cb99c405bcd1dac67 (diff)
downloadtcl-d23835257d7cdbf7c914e23117f34386a03420f4.zip
tcl-d23835257d7cdbf7c914e23117f34386a03420f4.tar.gz
tcl-d23835257d7cdbf7c914e23117f34386a03420f4.tar.bz2
Implementation of TIP #380
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r--generic/tclOOCall.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 9c9f3c0..8b1aeb1 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -37,7 +37,7 @@ struct ChainBuilder {
#define DEFINITE_PROTECTED 0x100000
#define DEFINITE_PUBLIC 0x200000
#define KNOWN_STATE (DEFINITE_PROTECTED | DEFINITE_PUBLIC)
-#define SPECIAL (CONSTRUCTOR | DESTRUCTOR)
+#define SPECIAL (CONSTRUCTOR | DESTRUCTOR | FORCE_UNKNOWN)
/*
* Function declarations for things defined in this file.
@@ -997,6 +997,22 @@ TclOOGetCallContext(
cb.oPtr = oPtr;
/*
+ * If we're working with a forced use of unknown, do that now.
+ */
+
+ if (flags & FORCE_UNKNOWN) {
+ AddSimpleChainToCallContext(oPtr, oPtr->fPtr->unknownMethodNameObj,
+ &cb, NULL, 0, NULL);
+ callPtr->flags |= OO_UNKNOWN_METHOD;
+ callPtr->epoch = -1;
+ if (count == callPtr->numChain) {
+ TclOODeleteChain(callPtr);
+ return NULL;
+ }
+ goto returnContext;
+ }
+
+ /*
* Add all defined filters (if any, and if we're going to be processing
* them; they're not processed for constructors, destructors or when we're
* in the middle of processing a filter).