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)
commit0a0e038603c9380370dd7fa63350362055c0e56b (patch)
tree1db6e1428e872a9de7d6e17956bad4dcfeeba688 /generic/tclOOCall.c
parent17b792953eb0ffa4cc0871f368bcf77621e8aeef (diff)
downloadtcl-0a0e038603c9380370dd7fa63350362055c0e56b.zip
tcl-0a0e038603c9380370dd7fa63350362055c0e56b.tar.gz
tcl-0a0e038603c9380370dd7fa63350362055c0e56b.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).