summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-09-14 03:46:50 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-09-14 03:46:50 (GMT)
commitd6a5a988b1a1360a77a043ec10d175c8a6c0fd36 (patch)
tree5488ff4bffc012fb31318be36a9b541fe2419992 /generic/tclBasic.c
parentc483a47557d64385bc3cc9f65aedf8b6bf387843 (diff)
downloadtcl-d6a5a988b1a1360a77a043ec10d175c8a6c0fd36.zip
tcl-d6a5a988b1a1360a77a043ec10d175c8a6c0fd36.tar.gz
tcl-d6a5a988b1a1360a77a043ec10d175c8a6c0fd36.tar.bz2
* generic/tclBasic.c: First caller of TclFormatToErrorInfo.
* generic/tclInt.h: Using stdarg.h conventions, add more * generic/tclStringObj.c: fixed arguments to TclFormatObj() and TclObjPrintf(). Added new routine TclFormatToErrorInfo().
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 7266c08..a038550 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.170 2005/09/13 21:23:51 dgp Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.171 2005/09/14 03:46:50 dgp Exp $
*/
#include "tclInt.h"
@@ -3769,22 +3769,9 @@ Tcl_EvalEx(interp, script, numBytes, flags)
code = Tcl_ListObjLength(interp,
objv[objectsUsed], &numElements);
if (code == TCL_ERROR) {
- /*
- * Attempt to expand a non-list.
- */
-
- Tcl_Obj *msg;
- Tcl_Obj *wordNum;
-
- msg = Tcl_NewStringObj("\n (expanding word ", -1);
- TclNewIntObj(wordNum, objectsUsed);
- Tcl_IncrRefCount(wordNum);
- Tcl_IncrRefCount(msg);
- Tcl_AppendObjToObj(msg, wordNum);
- Tcl_DecrRefCount(wordNum);
- Tcl_AppendToObj(msg, ")", -1);
- TclAppendObjToErrorInfo(interp, msg);
- Tcl_DecrRefCount(msg);
+ /* Attempt to expand a non-list. */
+ TclFormatToErrorInfo(interp,
+ "\n (expanding word %d)", objectsUsed);
Tcl_DecrRefCount(objv[objectsUsed]);
goto error;
}