summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-08 03:26:12 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-08 03:26:12 (GMT)
commita424abd3911d693fafc7c3f49015e39dd8099418 (patch)
tree48368319f5b057318530efaa143cff3ce1f8b5c9
parent89d7d04dbc30e04aabc39806f925f51a835889fd (diff)
parent53c609c3aa4042d00194dc6d3d2bea553ad9d605 (diff)
downloadtcl-a424abd3911d693fafc7c3f49015e39dd8099418.zip
tcl-a424abd3911d693fafc7c3f49015e39dd8099418.tar.gz
tcl-a424abd3911d693fafc7c3f49015e39dd8099418.tar.bz2
merge 8.5. update changes.
-rw-r--r--changes4
-rw-r--r--generic/tclBasic.c24
-rw-r--r--library/tm.tcl9
3 files changed, 35 insertions, 2 deletions
diff --git a/changes b/changes
index c51ff93..7376ba6 100644
--- a/changes
+++ b/changes
@@ -7784,4 +7784,8 @@ Many revisions to better support a Cygwin environment (nijtmans)
2013-08-15 Errors from execution traces become errors of the command (porter)
+2013-09-07 (bug fix) stop crashes in tclcompiler (kupries,porter)
+
+2013-09-07 (bug fix)[86ceb4] have tm path favor first provider (neumann,porter)
+
--- Released 8.5.15, September 16, 2013 --- http://core.tcl.tk/tcl/ for details
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 314b5fc..c3ab871 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1967,7 +1967,8 @@ Tcl_CreateCommand(
*
* Side effects:
* If a command named "cmdName" already exists for interp, it is
- * first deleted. Then the new command is created from the arguments.
+ * first deleted. Then the new command is created from the arguments.
+ * [***] (See below for exception).
*
* In the future, during bytecode evaluation when "cmdName" is seen as
* the name of a command by Tcl_EvalObj or Tcl_Eval, the object-based
@@ -2034,8 +2035,27 @@ Tcl_CreateObjCommand(
if (!isNew) {
cmdPtr = Tcl_GetHashValue(hPtr);
+ /* Command already exists. */
+
+ /*
+ * [***] This is wrong. See Tcl Bug a16752c252.
+ * However, this buggy behavior is kept under particular
+ * circumstances to accommodate deployed binaries of the
+ * "tclcompiler" program. http://sourceforge.net/projects/tclpro/
+ * that crash if the bug is fixed.
+ */
+
+ if (cmdPtr->objProc == TclInvokeStringCommand
+ && cmdPtr->clientData == clientData
+ && cmdPtr->deleteData == clientData
+ && cmdPtr->deleteProc == deleteProc) {
+ cmdPtr->objProc = proc;
+ cmdPtr->objClientData = clientData;
+ return (Tcl_Command) cmdPtr;
+ }
+
/*
- * Command already exists; delete it. Be careful to preserve any
+ * Otherwise, we delete the old command. Be careful to preserve any
* existing import links so we can restore them down below. That way,
* you can redefine a command and its import status will remain
* intact.
diff --git a/library/tm.tcl b/library/tm.tcl
index baa268d..7b9cafe 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -248,6 +248,15 @@ proc ::tcl::tm::UnknownHandler {original name args} {
continue
}
+ if {[package ifneeded $pkgname $pkgversion] ne {}} {
+ # There's already a provide script registered for
+ # this version of this package. Since all units of
+ # code claiming to be the same version of the same
+ # package ought to be identical, just stick with
+ # the one we already have.
+ continue
+ }
+
# We have found a candidate, generate a "provide
# script" for it, and remember it. Note that we
# are using ::list to do this; locally [list]