summaryrefslogtreecommitdiffstats
path: root/generic/tclIndexObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-06-07 10:04:46 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-06-07 10:04:46 (GMT)
commit665306595a3bc3b92d851d4df40e62875e0442e4 (patch)
treedb151d401631884701b22d31740507e5839dbd14 /generic/tclIndexObj.c
parentf10e294a14970b83477f6e6d09c48218469aa0a9 (diff)
downloadtcl-665306595a3bc3b92d851d4df40e62875e0442e4.zip
tcl-665306595a3bc3b92d851d4df40e62875e0442e4.tar.gz
tcl-665306595a3bc3b92d851d4df40e62875e0442e4.tar.bz2
Clean up tests in chan.test and add mechanism for chaining Tcl_WrongNumArgs
messages (used in [read] implementation)
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r--generic/tclIndexObj.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 478e3a9..9b858ab 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIndexObj.c,v 1.22 2004/11/25 16:37:15 dkf Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.23 2005/06/07 10:05:00 dkf Exp $
*/
#include "tclInt.h"
@@ -462,7 +462,12 @@ Tcl_WrongNumArgs(interp, objc, objv, message)
#endif /* AVOID_HACKS_FOR_ITCL */
TclNewObj(objPtr);
- Tcl_AppendToObj(objPtr, "wrong # args: should be \"", -1);
+ if (iPtr->flags & INTERP_ALTERNATE_WRONG_ARGS) {
+ Tcl_AppendObjToObj(objPtr, Tcl_GetObjResult(interp));
+ Tcl_AppendToObj(objPtr, " or \"", -1);
+ } else {
+ Tcl_AppendToObj(objPtr, "wrong # args: should be \"", -1);
+ }
/*
* Check to see if we are processing an ensemble implementation,