summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2024-06-09 16:35:47 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2024-06-09 16:35:47 (GMT)
commitb508f540d02cb5a053ff1dabc1ce7575b623de50 (patch)
treef132dff1d9e1aadc9c58827a6590333e44a72afc
parentdbb313112c09a087ebfc92496cf51cde838b6a9a (diff)
downloadtcl-b508f540d02cb5a053ff1dabc1ce7575b623de50.zip
tcl-b508f540d02cb5a053ff1dabc1ce7575b623de50.tar.gz
tcl-b508f540d02cb5a053ff1dabc1ce7575b623de50.tar.bz2
Update to new TIP revision
-rw-r--r--doc/return.n8
-rw-r--r--generic/tcl.h9
2 files changed, 8 insertions, 9 deletions
diff --git a/doc/return.n b/doc/return.n
index 6c5b821..52c1676 100644
--- a/doc/return.n
+++ b/doc/return.n
@@ -78,10 +78,10 @@ were the command \fBcontinue\fR.
\fIvalue\fR
.
\fIValue\fR must be an integer; it will be returned as the
-return code for the current procedure. Values in the range
--0x40000000 (-1073741824) to 0x40000000 (1073741824) are reserved
-for Tcl. Applications and extensions should use codes outside
-this range.
+return code for the current procedure. Applications
+and packages should use values in the range 5 to 268435455 (0x3fffffff)
+for their own purposes. Values outside this range are reserved
+for use by Tcl.
.LP
When a procedure wants to signal that it has received invalid
arguments from its caller, it may use \fBreturn -code error\fR
diff --git a/generic/tcl.h b/generic/tcl.h
index 183d2ca..f20a4d4 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -515,9 +515,8 @@ typedef struct stat *Tcl_OldStat_;
* exited; the interpreter's result is meaningless.
* TCL_CONTINUE Go on to the next iteration of the current loop; the
* interpreter's result is meaningless.
- * Integer return codes in the range TCL_CODE_MIN to TCL_CODE_MAX are
- * reserved for the use of Tcl. Extensions and packages are free to use
- * values outside this range for their own purposes.
+ * Integer return codes in the range TCL_CODE_USER_MIN to TCL_CODE_USER_MAX are
+ * reserved for the use of packages.
*/
#define TCL_OK 0
@@ -525,8 +524,8 @@ typedef struct stat *Tcl_OldStat_;
#define TCL_RETURN 2
#define TCL_BREAK 3
#define TCL_CONTINUE 4
-#define TCL_CODE_MAX 0x40000000
-#define TCL_CODE_MIN (-TCL_CODE_MAX)
+#define TCL_CODE_USER_MIN 5
+#define TCL_CODE_USER_MAX 0x3fffffff /* 268435455 */
/*
*----------------------------------------------------------------------------