summaryrefslogtreecommitdiffstats
path: root/generic/tclPkg.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-10-06 15:59:22 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-10-06 15:59:22 (GMT)
commitb0e29724338467351f10a4b11e317a5866ac658f (patch)
treed861bb4c44fd414c034f6faa23c736648d498e29 /generic/tclPkg.c
parenta57d7ac68eaafc7de2e3f9d05a148384f3716f52 (diff)
downloadtcl-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/tclPkg.c')
-rw-r--r--generic/tclPkg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 913b5ad..a58feb4 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.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: tclPkg.c,v 1.10 2003/12/24 04:18:20 davygrvy Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.11 2004/10/06 15:59:25 dgp Exp $
*/
#include "tclInt.h"
@@ -758,8 +758,8 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
|| (CheckVersion(interp, argv3) != TCL_OK)) {
return TCL_ERROR;
}
- Tcl_SetIntObj(Tcl_GetObjResult(interp),
- ComparePkgVersions(argv2, argv3, (int *) NULL));
+ Tcl_SetObjResult(interp, Tcl_NewIntObj(
+ ComparePkgVersions(argv2, argv3, (int *) NULL)));
break;
}
case PKG_VERSIONS: {
@@ -790,7 +790,7 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
return TCL_ERROR;
}
ComparePkgVersions(argv2, argv3, &satisfies);
- Tcl_SetIntObj(Tcl_GetObjResult(interp), satisfies);
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(satisfies));
break;
}
default: {