summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--generic/tclBasic.c3
-rw-r--r--generic/tclEvent.c3
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 7f081e4..67de549 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-02-28 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclBasic.c (Tcl_AppendObjToErrorInfo): Revised the
+ refcount management of Tcl_AppendObjToErrorInfo to become that of
+ a conventional Consumer routine. This preserves the ease of use
+ for the overwhelming common callers who pass in a 0-count value,
+ but makes the proper call with a non-0-count value less surprising.
+ * generic/tclEvent.c (TclDefaultBgErrorHandlerObjCmd): Revised the
+ one caller within Tcl itself which passes a non-0-count value to
+ Tcl_AppendObjToErrorInfo().
+
2008-02-28 Joe English <jenglish@users.sourceforge.net>
* unix/tclPort.h, unix/tclCompat.h, unix/tclUnixChan.h:
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index f825fdb..48e7059 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.292 2008/02/28 22:36:37 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.293 2008/02/29 19:59:59 dgp Exp $
*/
#include "tclInt.h"
@@ -5287,6 +5287,7 @@ Tcl_AppendObjToErrorInfo(
int length;
const char *message = TclGetStringFromObj(objPtr, &length);
+ Tcl_IncrRefCount(objPtr);
Tcl_AddObjErrorInfo(interp, message, length);
Tcl_DecrRefCount(objPtr);
}
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index dcce176..4193ade 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEvent.c,v 1.78 2007/12/13 15:23:16 dgp Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.79 2008/02/29 20:00:00 dgp Exp $
*/
#include "tclInt.h"
@@ -376,7 +376,6 @@ TclDefaultBgErrorHandlerObjCmd(
Tcl_DictObjGet(NULL, objv[2], keyPtr, &valuePtr);
Tcl_DecrRefCount(keyPtr);
if (valuePtr) {
- Tcl_IncrRefCount(valuePtr);
Tcl_AppendObjToErrorInfo(interp, valuePtr);
}