summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-10 13:04:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-10 13:04:09 (GMT)
commitb819f831ae7faeea840b095764fee75fbf712894 (patch)
tree215424b1f00d87893e1a29661c0fea343087cb05 /generic
parent5228c17959dbe7ad564041300de50f178267e99c (diff)
downloadtcl-b819f831ae7faeea840b095764fee75fbf712894.zip
tcl-b819f831ae7faeea840b095764fee75fbf712894.tar.gz
tcl-b819f831ae7faeea840b095764fee75fbf712894.tar.bz2
Fix [Bug 2155658]
Diffstat (limited to 'generic')
-rw-r--r--generic/tclOODefineCmds.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index fe7e8de..4d680ea 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.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: tclOODefineCmds.c,v 1.5 2008/09/23 05:05:54 dkf Exp $
+ * RCS: @(#) $Id: tclOODefineCmds.c,v 1.6 2008/10/10 13:04:09 dkf Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -1305,6 +1305,9 @@ TclOODefineExportObjCmd(
if (isNew) {
mPtr = (Method *) ckalloc(sizeof(Method));
memset(mPtr, 0, sizeof(Method));
+ mPtr->refCount = 1;
+ mPtr->namePtr = objv[i];
+ Tcl_IncrRefCount(objv[i]);
Tcl_SetHashValue(hPtr, mPtr);
} else {
mPtr = Tcl_GetHashValue(hPtr);
@@ -1768,6 +1771,9 @@ TclOODefineUnexportObjCmd(
if (isNew) {
mPtr = (Method *) ckalloc(sizeof(Method));
memset(mPtr, 0, sizeof(Method));
+ mPtr->refCount = 1;
+ mPtr->namePtr = objv[i];
+ Tcl_IncrRefCount(objv[i]);
Tcl_SetHashValue(hPtr, mPtr);
} else {
mPtr = Tcl_GetHashValue(hPtr);