summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-09-14 21:32:16 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-09-14 21:32:16 (GMT)
commit62b5bf66c2c8dda87b14b78f81bc58a02cdfb172 (patch)
tree82a5606aa3a2ef7d0ea577afdb0814e7a2a96e48 /generic/tclExecute.c
parentdc74c2b374a963186c53482685a2c91773ade3da (diff)
downloadtcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.zip
tcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.tar.gz
tcl-62b5bf66c2c8dda87b14b78f81bc58a02cdfb172.tar.bz2
* generic/tclStringObj.c: Bug fixes: ObjPrintfVA needed to
support "*" fields and needed to interpret precision limits on %s conversions as a maximum number of bytes, not Tcl_UniChars, to take from the (char *) argument. * generic/tclBasic.c: Updated several callers to use * generic/tclCkalloc.c: TclFormatToErrorInfo() and/or * generic/tclCmdAH.c: TclObjPrintf(). * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDictObj.c: * generic/tclExecute.c: * generic/tclIORChan.c: * generic/tclIOUtil.c: * generic/tclNamesp.c: * generic/tclProc.c:
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 94e489f..52556fd 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.199 2005/08/25 10:40:02 dkf Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.200 2005/09/14 21:32:17 dgp Exp $
*/
#include "tclInt.h"
@@ -6094,11 +6094,11 @@ TclExprFloatError(interp, value)
Tcl_SetErrorCode(interp, "ARITH", "OVERFLOW", s, (char *) NULL);
}
} else {
- char msg[64 + TCL_INTEGER_SPACE];
-
- sprintf(msg, "unknown floating-point error, errno = %d", errno);
- Tcl_SetObjResult(interp, Tcl_NewStringObj(msg, -1));
- Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN", msg, (char *) NULL);
+ Tcl_Obj *objPtr = Tcl_GetObjResult(interp);
+ TclObjPrintf(NULL, objPtr,
+ "unknown floating-point error, errno = %d", errno);
+ Tcl_SetErrorCode(interp, "ARITH", "UNKNOWN",
+ Tcl_GetString(objPtr), (char *) NULL);
}
}