summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-02-16 20:25:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-02-16 20:25:05 (GMT)
commit14a955c27520dbd65d0525ab0b1b3ea7c1ccc66a (patch)
treef47cd419de4ba2fadeaa1c511880e4dac7a2a28c /generic
parent0db044ae28d427ebebd09c07b3d6212d3ee1357a (diff)
downloadtcl-14a955c27520dbd65d0525ab0b1b3ea7c1ccc66a.zip
tcl-14a955c27520dbd65d0525ab0b1b3ea7c1ccc66a.tar.gz
tcl-14a955c27520dbd65d0525ab0b1b3ea7c1ccc66a.tar.bz2
* generic/tclIndexObj.c: Disallow the "ambiguous" error message
* tests/indexObj.test: when TCL_EXACT matching is requested. * tests/ioCmd.test:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIndexObj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 0b5401d..c9f8e1d 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.27 2005/11/01 15:30:52 dkf Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.28 2006/02/16 20:25:07 dgp Exp $
*/
#include "tclInt.h"
@@ -270,8 +270,8 @@ Tcl_GetIndexFromObjStruct(
TclNewObj(resultPtr);
Tcl_SetObjResult(interp, resultPtr);
- Tcl_AppendStringsToObj(resultPtr,
- (numAbbrev > 1) ? "ambiguous " : "bad ", msg, " \"", key,
+ Tcl_AppendStringsToObj(resultPtr, (numAbbrev > 1) &&
+ !(flags & TCL_EXACT) ? "ambiguous " : "bad ", msg, " \"", key,
"\": must be ", STRING_AT(tablePtr, offset, 0), NULL);
for (entryPtr = NEXT_ENTRY(tablePtr, offset), count = 0;
*entryPtr != NULL;