diff options
author | dgp <dgp@users.sourceforge.net> | 2004-10-06 15:59:22 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-10-06 15:59:22 (GMT) |
commit | b0e29724338467351f10a4b11e317a5866ac658f (patch) | |
tree | d861bb4c44fd414c034f6faa23c736648d498e29 /generic/tclTimer.c | |
parent | a57d7ac68eaafc7de2e3f9d05a148384f3716f52 (diff) | |
download | tcl-b0e29724338467351f10a4b11e317a5866ac658f.zip tcl-b0e29724338467351f10a4b11e317a5866ac658f.tar.gz tcl-b0e29724338467351f10a4b11e317a5866ac658f.tar.bz2 |
* generic/tclBasic.c:
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclCompExpr.c:
* generic/tclDictObj.c:
* generic/tclEncoding.c:
* generic/tclExecute.c:
* generic/tclFCmd.c:
* generic/tclHistory.c:
* generic/tclIndexObj.c:
* generic/tclInterp.c:
* generic/tclIO.c:
* generic/tclIOCmd.c:
* generic/tclNamesp.c:
* generic/tclObj.c:
* generic/tclPkg.c:
* generic/tclResult.c:
* generic/tclScan.c:
* generic/tclTimer.c:
* generic/tclTrace.c:
* generic/tclUtil.c:
* generic/tclVar.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
Diffstat (limited to 'generic/tclTimer.c')
-rw-r--r-- | generic/tclTimer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclTimer.c b/generic/tclTimer.c index 3093ac6..8c5a210 100644 --- a/generic/tclTimer.c +++ b/generic/tclTimer.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTimer.c,v 1.11 2004/09/07 18:24:48 kennykb Exp $ + * RCS: @(#) $Id: tclTimer.c,v 1.12 2004/10/06 15:59:25 dgp Exp $ */ #include "tclInt.h" @@ -917,7 +917,7 @@ processInteger: "\" doesn't exist", (char *) NULL); return TCL_ERROR; } - resultListPtr = Tcl_GetObjResult(interp); + resultListPtr = Tcl_NewObj(); Tcl_ListObjAppendElement(interp, resultListPtr, afterPtr->commandPtr); Tcl_ListObjAppendElement(interp, resultListPtr, Tcl_NewStringObj( (afterPtr->token == NULL) ? "idle" : "timer", -1)); |