summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-06-01 08:11:06 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-06-01 08:11:06 (GMT)
commitfe88072b187128153a10f1860ef4312d08254b9f (patch)
tree0dd3ea38d0f6cb60cee6eae9bc1b4e59abfa940b
parent64aa67bd929d210bd1d764bd73312496dee8002d (diff)
downloadtcl-fe88072b187128153a10f1860ef4312d08254b9f.zip
tcl-fe88072b187128153a10f1860ef4312d08254b9f.tar.gz
tcl-fe88072b187128153a10f1860ef4312d08254b9f.tar.bz2
Complete fix of [Bug 1981001]
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclOOMethod.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 45510b9..bd674eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-01 Donal K. Fellows <dkf@users.sf.net>
+
+ * generic/tclOOMethod.c (Tcl_NewMethod): Complete the fix of [Bug
+ 1981001], previous fix was incomplete though helpful in telling me
+ where to look.
+
2008-06-01 Joe Mistachkin <joe@mistachkin.com>
* win/Makefile.in: Add tclOO genstubs to Windows makefiles and remove
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index 678334e..053336e 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.4 2008/06/01 05:09:36 kennykb Exp $
+ * RCS: @(#) $Id: tclOOMethod.c,v 1.5 2008/06/01 08:11:07 dkf Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -124,6 +124,7 @@ Tcl_NewInstanceMethod(
if (nameObj == NULL) {
mPtr = (Method *) ckalloc(sizeof(Method));
mPtr->namePtr = NULL;
+ mPtr->refCount = 1;
goto populate;
}
if (!oPtr->methodsPtr) {
@@ -191,11 +192,13 @@ Tcl_NewMethod(
if (nameObj == NULL) {
mPtr = (Method *) ckalloc(sizeof(Method));
mPtr->namePtr = NULL;
+ mPtr->refCount = 1;
goto populate;
}
hPtr = Tcl_CreateHashEntry(&clsPtr->classMethods, (char *)nameObj,&isNew);
if (isNew) {
mPtr = (Method *) ckalloc(sizeof(Method));
+ mPtr->refCount = 1;
mPtr->namePtr = nameObj;
Tcl_IncrRefCount(nameObj);
Tcl_SetHashValue(hPtr, mPtr);
@@ -210,7 +213,6 @@ Tcl_NewMethod(
clsPtr->thisPtr->fPtr->epoch++;
mPtr->typePtr = typePtr;
mPtr->clientData = clientData;
- mPtr->refCount = 1;
mPtr->flags = 0;
mPtr->declaringObjectPtr = NULL;
mPtr->declaringClassPtr = clsPtr;