summaryrefslogtreecommitdiffstats
path: root/generic/tclIndexObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-01-29 11:36:22 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-01-29 11:36:22 (GMT)
commitcc74cb8525d95e0ac4eb314e015ea072140aa52b (patch)
tree2e17590c57c77b3e63c6a00a70912f076bdd4b9b /generic/tclIndexObj.c
parent1402f26fc8cd143a3281e3c3f4436d12246f5ea1 (diff)
parente543dbc09cba01dbf261e35bcb9d708f7de75aa4 (diff)
downloadtcl-cc74cb8525d95e0ac4eb314e015ea072140aa52b.zip
tcl-cc74cb8525d95e0ac4eb314e015ea072140aa52b.tar.gz
tcl-cc74cb8525d95e0ac4eb314e015ea072140aa52b.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r--generic/tclIndexObj.c33
1 files changed, 2 insertions, 31 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index a1ddbfa..13f00bf 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -881,29 +881,6 @@ Tcl_WrongNumArgs(
Interp *iPtr = (Interp *) interp;
const char *elementStr;
- /*
- * [incr Tcl] does something fairly horrific when generating error
- * messages for its ensembles; it passes the whole set of ensemble
- * arguments as a list in the first argument. This means that this code
- * causes a problem in iTcl if it attempts to correctly quote all
- * arguments, which would be the correct thing to do. We work around this
- * nasty behaviour for now, and hope that we can remove it all in the
- * future...
- */
-
-#ifndef AVOID_HACKS_FOR_ITCL
- int isFirst = 1; /* Special flag used to inhibit the treating
- * of the first word as a list element so the
- * hacky way Itcl generates error messages for
- * its ensembles will still work. [Bug
- * 1066837] */
-# define MAY_QUOTE_WORD (!isFirst)
-# define AFTER_FIRST_WORD (isFirst = 0)
-#else /* !AVOID_HACKS_FOR_ITCL */
-# define MAY_QUOTE_WORD 1
-# define AFTER_FIRST_WORD (void) 0
-#endif /* AVOID_HACKS_FOR_ITCL */
-
TclNewObj(objPtr);
if (iPtr->flags & INTERP_ALTERNATE_WRONG_ARGS) {
iPtr->flags &= ~INTERP_ALTERNATE_WRONG_ARGS;
@@ -970,7 +947,7 @@ Tcl_WrongNumArgs(
flags = 0;
len = TclScanElement(elementStr, elemLen, &flags);
- if (MAY_QUOTE_WORD && len != elemLen) {
+ if (len != elemLen) {
char *quotedElementStr = TclStackAlloc(interp,
(unsigned)len + 1);
@@ -982,8 +959,6 @@ Tcl_WrongNumArgs(
Tcl_AppendToObj(objPtr, elementStr, elemLen);
}
- AFTER_FIRST_WORD;
-
/*
* Add a space if the word is not the last one (which has a
* moderately complex condition here).
@@ -1021,7 +996,7 @@ Tcl_WrongNumArgs(
flags = 0;
len = TclScanElement(elementStr, elemLen, &flags);
- if (MAY_QUOTE_WORD && len != elemLen) {
+ if (len != elemLen) {
char *quotedElementStr = TclStackAlloc(interp,
(unsigned) len + 1);
@@ -1034,8 +1009,6 @@ Tcl_WrongNumArgs(
}
}
- AFTER_FIRST_WORD;
-
/*
* Append a space character (" ") if there is more text to follow
* (either another element from objv, or the message string).
@@ -1058,8 +1031,6 @@ Tcl_WrongNumArgs(
Tcl_AppendStringsToObj(objPtr, "\"", NULL);
Tcl_SetErrorCode(interp, "TCL", "WRONGARGS", NULL);
Tcl_SetObjResult(interp, objPtr);
-#undef MAY_QUOTE_WORD
-#undef AFTER_FIRST_WORD
}
/*