summaryrefslogtreecommitdiffstats
path: root/generic/tclOOMethod.c
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2008-06-01 05:09:35 (GMT)
committerKevin B Kenny <kennykb@acm.org>2008-06-01 05:09:35 (GMT)
commit64aa67bd929d210bd1d764bd73312496dee8002d (patch)
treecaf160b68ddc6a1bb31b773b37350b3ccb61214a /generic/tclOOMethod.c
parent8a1ba857d507f08ae03699c6116c31efd569e5de (diff)
downloadtcl-64aa67bd929d210bd1d764bd73312496dee8002d.zip
tcl-64aa67bd929d210bd1d764bd73312496dee8002d.tar.gz
tcl-64aa67bd929d210bd1d764bd73312496dee8002d.tar.bz2
* generic/tclOOMethod.c: Fix a bug where the refcount of a method
was reset if the method was redefined while there was an active invocation. [Bug #1981001]
Diffstat (limited to 'generic/tclOOMethod.c')
-rw-r--r--generic/tclOOMethod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 9d53d6a..678334e 100644
--- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclOOMethod.c,v 1.3 2008/05/31 23:35:27 das Exp $
+ * RCS: @(#) $Id: tclOOMethod.c,v 1.4 2008/06/01 05:09:36 kennykb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -135,6 +135,7 @@ Tcl_NewInstanceMethod(
if (isNew) {
mPtr = (Method *) ckalloc(sizeof(Method));
mPtr->namePtr = nameObj;
+ mPtr->refCount = 1;
Tcl_IncrRefCount(nameObj);
Tcl_SetHashValue(hPtr, mPtr);
} else {
@@ -147,7 +148,6 @@ Tcl_NewInstanceMethod(
populate:
mPtr->typePtr = typePtr;
mPtr->clientData = clientData;
- mPtr->refCount = 1;
mPtr->flags = 0;
mPtr->declaringObjectPtr = oPtr;
mPtr->declaringClassPtr = NULL;