summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-08-23 19:18:19 (GMT)
committerhobbs <hobbs>2000-08-23 19:18:19 (GMT)
commit50b9bc1638f4c41a8d83bef8954ee03469089691 (patch)
tree240d5816988730f830ec2801cc2a97c99f4d8c91
parent58aa030aa0300ffe286772d5244a10291f0e0ce8 (diff)
downloadtk-50b9bc1638f4c41a8d83bef8954ee03469089691.zip
tk-50b9bc1638f4c41a8d83bef8954ee03469089691.tar.gz
tk-50b9bc1638f4c41a8d83bef8954ee03469089691.tar.bz2
* generic/tkButton.c (ButtonTextVarProc): reversed change below,
it was not correct.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkButton.c11
2 files changed, 8 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c6da5a..4845b60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-08-23 Jeff Hobbs <hobbs@scriptics.com>
+
+ * generic/tkButton.c (ButtonTextVarProc): reversed change below,
+ it was not correct.
+
2000-08-22 Jeff Hobbs <hobbs@scriptics.com>
* generic/tkButton.c (ButtonTextVarProc): changed order of
diff --git a/generic/tkButton.c b/generic/tkButton.c
index e761137..bc97641 100644
--- a/generic/tkButton.c
+++ b/generic/tkButton.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkButton.c,v 1.9 2000/08/23 00:08:45 hobbs Exp $
+ * RCS: @(#) $Id: tkButton.c,v 1.10 2000/08/23 19:18:19 hobbs Exp $
*/
#include "tkButton.h"
@@ -1645,14 +1645,9 @@ ButtonTextVarProc(clientData, interp, name1, name2, flags)
if (valuePtr == NULL) {
valuePtr = Tcl_NewObj();
}
- /*
- * Incr valuePtr before Decr, in case they point to the same object.
- * We could also do some short-circuiting in that case, but it
- * shouldn't happen in practice.
- */
- Tcl_IncrRefCount(valuePtr);
- butPtr->textPtr = valuePtr;
Tcl_DecrRefCount(butPtr->textPtr);
+ butPtr->textPtr = valuePtr;
+ Tcl_IncrRefCount(butPtr->textPtr);
TkpComputeButtonGeometry(butPtr);
if ((butPtr->tkwin != NULL) && Tk_IsMapped(butPtr->tkwin)