summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2009-02-03 18:16:06 (GMT)
committerdkf <dkf@noemail.net>2009-02-03 18:16:06 (GMT)
commit5911d044710a42ca60c61434bb4f4c0d5fad2895 (patch)
tree34733528ed73f7146ab9785783c0dfcfdb3c57ce /generic/tclObj.c
parentbb8a289ef328180e5e0e604c0300660c3d7e5acc (diff)
downloadtcl-5911d044710a42ca60c61434bb4f4c0d5fad2895.zip
tcl-5911d044710a42ca60c61434bb4f4c0d5fad2895.tar.gz
tcl-5911d044710a42ca60c61434bb4f4c0d5fad2895.tar.bz2
Fix for [Bug 2558422] though this area is still a mess.
FossilOrigin-Name: 3e5eb953792a476daf26bd665c9100f367ec6ec7
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 */