diff options
author | kennykb <kennykb@noemail.net> | 2008-06-01 05:09:34 (GMT) |
---|---|---|
committer | kennykb <kennykb@noemail.net> | 2008-06-01 05:09:34 (GMT) |
commit | 5c5240f1bc17c95ee45621a195f1aece383bb5ad (patch) | |
tree | caf160b68ddc6a1bb31b773b37350b3ccb61214a /generic/tclOOMethod.c | |
parent | 385077e0141c80d4f5749ccb3138df49a7b64ce9 (diff) | |
download | tcl-5c5240f1bc17c95ee45621a195f1aece383bb5ad.zip tcl-5c5240f1bc17c95ee45621a195f1aece383bb5ad.tar.gz tcl-5c5240f1bc17c95ee45621a195f1aece383bb5ad.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]
FossilOrigin-Name: d14255cc75282a3a0286102e62d50c442abe782b
Diffstat (limited to 'generic/tclOOMethod.c')
-rw-r--r-- | generic/tclOOMethod.c | 4 |
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; |