summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmdsSZ.c
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-03-23 12:58:38 (GMT)
committernijtmans <nijtmans>2010-03-23 12:58:38 (GMT)
commitddc540e0328b146dd871015f3c32296da797920a (patch)
treeaff7dbfe0bd97a4d49dca1356f58e5452e89f3a8 /generic/tclCompCmdsSZ.c
parent6838a5c3396760aa126ef99f25c1bb7b992700ba (diff)
downloadtcl-ddc540e0328b146dd871015f3c32296da797920a.zip
tcl-ddc540e0328b146dd871015f3c32296da797920a.tar.gz
tcl-ddc540e0328b146dd871015f3c32296da797920a.tar.bz2
Make error message in "try" implementation
exactly the same as the one in "return"
Diffstat (limited to 'generic/tclCompCmdsSZ.c')
-rw-r--r--generic/tclCompCmdsSZ.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index f6f8efb..d8fdcd1 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.5 2010/03/19 11:54:07 dkf Exp $
+ * RCS: @(#) $Id: tclCompCmdsSZ.c,v 1.6 2010/03/23 12:58:39 nijtmans Exp $
*/
#include "tclInt.h"
@@ -1992,7 +1992,7 @@ TclCompileTryCmd(
} else if (tokenPtr[1].size == 2
&& !strncmp(tokenPtr[1].start, "on", 2)) {
int code;
- static const char *codes[] = {
+ static const char *const returnCodes[] = {
"ok", "error", "return", "break", "continue", NULL
};
@@ -2008,7 +2008,7 @@ TclCompileTryCmd(
goto failedToCompile;
}
if (Tcl_GetIntFromObj(NULL, tmpObj, &code) != TCL_OK
- && Tcl_GetIndexFromObj(NULL, tmpObj, codes, "",
+ && Tcl_GetIndexFromObj(NULL, tmpObj, returnCodes, "",
TCL_EXACT, &code) != TCL_OK) {
TclDecrRefCount(tmpObj);
goto failedToCompile;