diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-02-03 18:16:07 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-02-03 18:16:07 (GMT) |
commit | 8241e0c897749cfb51138f389c8dfe44596f739f (patch) | |
tree | 34733528ed73f7146ab9785783c0dfcfdb3c57ce | |
parent | c5b1811e0b0594c5549206669adcc79215551d09 (diff) | |
download | tcl-8241e0c897749cfb51138f389c8dfe44596f739f.zip tcl-8241e0c897749cfb51138f389c8dfe44596f739f.tar.gz tcl-8241e0c897749cfb51138f389c8dfe44596f739f.tar.bz2 |
Fix for [Bug 2558422] though this area is still a mess.
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | generic/tclObj.c | 12 |
2 files changed, 22 insertions, 9 deletions
@@ -1,3 +1,9 @@ +2009-02-03 Donal K. Fellows <dkf@users.sf.net> + + * generic/tclObj.c (tclCmdNameType): [Bug 2558422]: Corrected the type + of this structure so that extensions that write it (yuk!) will still + be able to function correctly. + 2009-02-03 Don Porter <dgp@users.sourceforge.net> * generic/tclStringObj.c (SetUnicodeObj): Corrected failure of @@ -15,18 +21,17 @@ significant forkage of the 8.5 and 8.6 implementations -- that are better off avoided if there's no gain. - * generic/tclStringObj.c (STRING_NOMEM): Add missing cast of - NULL to (char *) that upsets some compilers. [Bug 2494093]. + * generic/tclStringObj.c (STRING_NOMEM): [Bug 2494093]: Add missing + cast of NULL to (char *) that upsets some compilers. - * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): Added - protections against callers asking for negative lengths. It is + * generic/tclStringObj.c (Tcl_(Attempt)SetObjLength): [Bug 2553906]: + Added protections against callers asking for negative lengths. It is likely when this happens that an integer overflow is to blame. - [Bug 2553906]. 2009-02-01 David Gravereaux <davygrvy@pobox.com> - * win/makefile.vc: Allow nmake flags such as -a (rebuild - all) to pass down to the pkgs targets, too. + * win/makefile.vc: Allow nmake flags such as -a (rebuild all) to pass + down to the pkgs targets, too. 2009-01-30 Donal K. Fellows <dkf@users.sf.net> 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 */ |