summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdMZ.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r--generic/tclCmdMZ.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index a77431c..578e977 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdMZ.c,v 1.135 2006/08/21 01:08:41 das Exp $
+ * RCS: @(#) $Id: tclCmdMZ.c,v 1.136 2006/10/31 20:19:45 dgp Exp $
*/
#include "tclInt.h"
@@ -2128,11 +2128,9 @@ Tcl_StringObjCmd(dummy, interp, objc, objv)
length2 = length1 * count;
if ((length2 / count) != length1) {
- resultPtr = Tcl_NewObj();
- TclObjPrintf(NULL, resultPtr,
+ Tcl_SetObjResult(interp, TclObjPrintf(NULL,
"string size overflow, must be less than %d",
- INT_MAX);
- Tcl_SetObjResult(interp, resultPtr);
+ INT_MAX));
return TCL_ERROR;
}
@@ -2884,9 +2882,10 @@ Tcl_SwitchObjCmd(dummy, interp, objc, objv)
if (result == TCL_ERROR) {
int limit = 50;
int overflow = (patternLength > limit);
- TclFormatToErrorInfo(interp, "\n (\"%.*s%s\" arm line %d)",
+ TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL,
+ "\n (\"%.*s%s\" arm line %d)",
(overflow ? limit : patternLength), pattern,
- (overflow ? "..." : ""), interp->errorLine);
+ (overflow ? "..." : ""), interp->errorLine));
}
return result;
}
@@ -3031,8 +3030,8 @@ Tcl_WhileObjCmd(dummy, interp, objc, objv)
result = Tcl_EvalObjEx(interp, objv[2], 0);
if ((result != TCL_OK) && (result != TCL_CONTINUE)) {
if (result == TCL_ERROR) {
- TclFormatToErrorInfo(interp, "\n (\"while\" body line %d)",
- interp->errorLine);
+ TclAppendObjToErrorInfo(interp, TclObjPrintf(NULL,
+ "\n (\"while\" body line %d)", interp->errorLine));
}
break;
}