summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2009-02-03 18:16:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2009-02-03 18:16:07 (GMT)
commit8241e0c897749cfb51138f389c8dfe44596f739f (patch)
tree34733528ed73f7146ab9785783c0dfcfdb3c57ce /generic/tclObj.c
parentc5b1811e0b0594c5549206669adcc79215551d09 (diff)
downloadtcl-8241e0c897749cfb51138f389c8dfe44596f739f.zip
tcl-8241e0c897749cfb51138f389c8dfe44596f739f.tar.gz
tcl-8241e0c897749cfb51138f389c8dfe44596f739f.tar.bz2
Fix for [Bug 2558422] though this area is still a mess.
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 93cf2f4..72de8f4 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.148 2009/02/03 17:15:28 dgp Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.149 2009/02/03 18:16:07 dkf Exp $
*/
#include "tclInt.h"
@@ -277,9 +277,17 @@ const Tcl_HashKeyType tclObjHashKeyType = {
* ResolvedCmdName pointer, but DO NOT DO THIS. It seems that some extensions
* use the second internal pointer field of the twoPtrValue field for their
* own purposes.
+ *
+ * TRICKY POINT! Some extensions update this structure! (Notably, these
+ * include TclBlend and TCom). This is highly ill-advised on their part, but
+ * does allow them to delete a command when references to it are gone, which
+ * is fragile but useful given their somewhat-OO style. Because of this, this
+ * structure MUST NOT be const so that the C compiler puts the data in
+ * writable memory. [Bug 2558422]
+ * TODO: Provide a better API for those extensions so that they can coexist...
*/
-static const Tcl_ObjType tclCmdNameType = {
+Tcl_ObjType tclCmdNameType = {
"cmdName", /* name */
FreeCmdNameInternalRep, /* freeIntRepProc */
DupCmdNameInternalRep, /* dupIntRepProc */