summaryrefslogtreecommitdiffstats
path: root/generic/tclFCmd.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2004-10-06 14:59:00 (GMT)
committerdgp <dgp@noemail.net>2004-10-06 14:59:00 (GMT)
commite266385a3977c6a9d35f7f2972055809fcb47d0a (patch)
tree71a0e0114969e45230d047cb6fb0374e8f243c37 /generic/tclFCmd.c
parentb4808b5cd1d437bbf1589adc0ce0629c127e5511 (diff)
downloadtcl-e266385a3977c6a9d35f7f2972055809fcb47d0a.zip
tcl-e266385a3977c6a9d35f7f2972055809fcb47d0a.tar.gz
tcl-e266385a3977c6a9d35f7f2972055809fcb47d0a.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: 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. FossilOrigin-Name: ee7c709e65fd0e2df636a6d1467bc907a2104da0
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r--generic/tclFCmd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c
index 3d0bb95..17959fc 100644
--- a/generic/tclFCmd.c
+++ b/generic/tclFCmd.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: tclFCmd.c,v 1.27 2004/10/06 13:09:43 dkf Exp $
+ * RCS: @(#) $Id: tclFCmd.c,v 1.28 2004/10/06 14:59:02 dgp Exp $
*/
#include "tclInt.h"
@@ -936,9 +936,8 @@ TclFileAttrsCmd(interp, objc, objv)
* There was an error, probably that the filePtr is
* not accepted by any filesystem
*/
- Tcl_AppendStringsToObj(Tcl_GetObjResult(interp),
- "could not read \"", Tcl_GetString(filePtr),
- "\": ", Tcl_PosixError(interp),
+ Tcl_AppendResult(interp, "could not read \"",
+ Tcl_GetString(filePtr), "\": ", Tcl_PosixError(interp),
(char *) NULL);
return TCL_ERROR;
}