diff options
author | dgp <dgp@users.sourceforge.net> | 2008-02-29 19:59:59 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-02-29 19:59:59 (GMT) |
commit | f971bc37c350f55dfdd2ed65cf406aa4e81feb9e (patch) | |
tree | 8866755e4fddda1f41d89fd24646567b0cdebf3d /generic/tclBasic.c | |
parent | c08d157ff67d885fef923e525d7a48dc9a2094f4 (diff) | |
download | tcl-f971bc37c350f55dfdd2ed65cf406aa4e81feb9e.zip tcl-f971bc37c350f55dfdd2ed65cf406aa4e81feb9e.tar.gz tcl-f971bc37c350f55dfdd2ed65cf406aa4e81feb9e.tar.bz2 |
* 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().
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |