From 5b8c3257ff518c67cc7dc645c47804f3f7f23980 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Sun, 9 Jun 2024 16:35:47 +0000 Subject: Update to new TIP revision --- doc/return.n | 8 ++++---- generic/tcl.h | 9 ++++----- 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 */ /* *---------------------------------------------------------------------------- -- cgit v0.12