summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.h
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-03-07 18:39:44 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-03-07 18:39:44 (GMT)
commit2c44354d13f15b788a4213ab50441eed6ad54f75 (patch)
treeb78a9c9ff6edf0a01ad9f4f76cb337031205c7c8 /generic/tclCompile.h
parent612199cbe93e3fb4c39cd92afd245616115ad442 (diff)
downloadtcl-2c44354d13f15b788a4213ab50441eed6ad54f75.zip
tcl-2c44354d13f15b788a4213ab50441eed6ad54f75.tar.gz
tcl-2c44354d13f15b788a4213ab50441eed6ad54f75.tar.bz2
Establish 4 symbols for categories of parsed index values:
TCL_INDEX_START = 0 The start index. TCL_INDEX_END = -2 The "end" index. TCL_INDEX_BEFORE = -1 All indices less than start. TCL_INDEX_AFTER = INT_MAX All indices greater than "end". Then use these symbols among callers of TclGetIndexFromToken() so that index value parsing can directly implement the callers sense of when out of range indices ought to be treated the same as start or end positions.
Diffstat (limited to 'generic/tclCompile.h')
-rw-r--r--generic/tclCompile.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 2f23b90..9501d93 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1690,7 +1690,9 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
*/
#define TCL_INDEX_END (-2)
-#define TCL_INDEX_OUT_OF_RANGE (-1)
+#define TCL_INDEX_BEFORE (-1)
+#define TCL_INDEX_START (0)
+#define TCL_INDEX_AFTER (INT_MAX)
/*
* DTrace probe macros (NOPs if DTrace support is not enabled).