summaryrefslogtreecommitdiffstats
path: root/generic/tclOOCall.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-09-25 10:13:21 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-09-25 10:13:21 (GMT)
commit06f91946030154decdc65de2088fe5633562dae0 (patch)
treef6a76ec34fc3db6e3106e0a2599d318ab8cfa75a /generic/tclOOCall.c
parent320d7eee6064ca0dd8cb639bd5be69ba1540090e (diff)
downloadtcl-06f91946030154decdc65de2088fe5633562dae0.zip
tcl-06f91946030154decdc65de2088fe5633562dae0.tar.gz
tcl-06f91946030154decdc65de2088fe5633562dae0.tar.bz2
Fix [Bug 2120903]
Diffstat (limited to 'generic/tclOOCall.c')
-rw-r--r--generic/tclOOCall.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index e517d28..d4b1297 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.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: tclOOCall.c,v 1.10 2008/07/18 23:29:44 msofer Exp $
+ * RCS: @(#) $Id: tclOOCall.c,v 1.11 2008/09/25 10:13:30 dkf Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -832,14 +832,17 @@ InitCallChain(
Object *oPtr,
int flags)
{
+ callPtr->flags = flags &
+ (PUBLIC_METHOD | PRIVATE_METHOD | SPECIAL | FILTER_HANDLING);
if (oPtr->flags & USE_CLASS_CACHE) {
oPtr = oPtr->selfCls->thisPtr;
+ callPtr->flags |= USE_CLASS_CACHE;
+ } else {
+ callPtr->flags &= ~USE_CLASS_CACHE;
}
callPtr->epoch = oPtr->fPtr->epoch;
callPtr->objectCreationEpoch = oPtr->creationEpoch;
callPtr->objectEpoch = oPtr->epoch;
- callPtr->flags = flags &
- (PUBLIC_METHOD | PRIVATE_METHOD | SPECIAL | FILTER_HANDLING);
callPtr->refCount = 1;
callPtr->numChain = 0;
callPtr->chain = callPtr->staticChain;
@@ -869,12 +872,8 @@ IsStillValid(
int mask)
{
if ((oPtr->flags & USE_CLASS_CACHE)) {
- register Object *coPtr = oPtr->selfCls->thisPtr;
-
- return ((callPtr->objectCreationEpoch == coPtr->creationEpoch)
- && (callPtr->epoch == coPtr->fPtr->epoch)
- && (callPtr->objectEpoch == coPtr->epoch)
- && ((callPtr->flags & mask) == (flags & mask)));
+ oPtr = oPtr->selfCls->thisPtr;
+ flags |= USE_CLASS_CACHE;
}
return ((callPtr->objectCreationEpoch == oPtr->creationEpoch)
&& (callPtr->epoch == oPtr->fPtr->epoch)