diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-09 15:07:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-04-09 15:07:59 (GMT) |
commit | 9cd2b514ea9d20819f7a57203cd8a27504dc401c (patch) | |
tree | 976cc91451173a150064f7462bb80169f043ff2f | |
parent | ba8afe6195213838acef6ed5b143b4a508b21c63 (diff) | |
download | tcl-9cd2b514ea9d20819f7a57203cd8a27504dc401c.zip tcl-9cd2b514ea9d20819f7a57203cd8a27504dc401c.tar.gz tcl-9cd2b514ea9d20819f7a57203cd8a27504dc401c.tar.bz2 |
Remove Tcl_NewIndexObj/Tcl_SetIndexObj. Since Tcl_Size is signed now, it doesn't add much value any more.
-rw-r--r-- | doc/IntObj.3 | 13 | ||||
-rw-r--r-- | generic/tclDecls.h | 8 |
2 files changed, 4 insertions, 17 deletions
diff --git a/doc/IntObj.3 b/doc/IntObj.3 index 98cba9b..2cc3593 100644 --- a/doc/IntObj.3 +++ b/doc/IntObj.3 @@ -8,7 +8,7 @@ .so man.macros .BS .SH NAME -Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_NewWideUIntObj, Tcl_NewIndexObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_SetWideUIntObj, Tcl_SetIndexObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_GetWideUIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers +Tcl_NewIntObj, Tcl_NewLongObj, Tcl_NewWideIntObj, Tcl_NewWideUIntObj, Tcl_SetIntObj, Tcl_SetLongObj, Tcl_SetWideIntObj, Tcl_SetWideUIntObj, Tcl_GetIntFromObj, Tcl_GetIntForIndex, Tcl_GetLongFromObj, Tcl_GetWideIntFromObj, Tcl_GetWideUIntFromObj, Tcl_NewBignumObj, Tcl_SetBignumObj, Tcl_GetBignumFromObj, Tcl_TakeBignumFromObj \- manipulate Tcl values as integers .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -25,9 +25,6 @@ Tcl_Obj * Tcl_Obj * \fBTcl_NewWideUIntObj\fR(\fIuwideValue\fR) .sp -Tcl_Obj * -\fBTcl_NewIndexObj\fR(\fIindexValue\fR) -.sp \fBTcl_SetIntObj\fR(\fIobjPtr, intValue\fR) .sp \fBTcl_SetLongObj\fR(\fIobjPtr, longValue\fR) @@ -36,8 +33,6 @@ Tcl_Obj * .sp \fBTcl_SetWideUIntObj\fR(\fIobjPtr, uwideValue\fR) .sp -\fBTcl_SetIndexObj\fR(\fIobjPtr, indexValue\fR) -.sp int \fBTcl_GetIntFromObj\fR(\fIinterp, objPtr, intPtr\fR) .sp @@ -90,7 +85,7 @@ Unsigned wide integer value used to initialize or set a Tcl value. In Tcl 8.x, \fTcl_Size\f is actually the same as int. .AP Tcl_Obj *objPtr in/out For \fBTcl_SetIntObj\fR, \fBTcl_SetLongObj\fR, \fBTcl_SetWideIntObj\fR, -\fBTcl_SetWideUIntObj\fR, \fBTcl_SetIndexObj\fR, +\fBTcl_SetWideUIntObj\fR, and \fBTcl_SetBignumObj\fR, this points to the value in which to store an integral value. For \fBTcl_GetIntFromObj\fR, \fBTcl_GetLongFromObj\fR, \fBTcl_GetWideIntFromObj\fR, \fBTcl_GetBignumFromObj\fR, and @@ -136,12 +131,12 @@ The \fBmp_int\fR type is a multiple-precision integer type defined by the LibTomMath multiple-precision integer library. .PP The \fBTcl_NewIntObj\fR, \fBTcl_NewLongObj\fR, \fBTcl_NewWideIntObj\fR, -\fBTcl_NewWideUIntObj\fR, \fBTcl_NewIndexObj\fR, and \fBTcl_NewBignumObj\fR +\fBTcl_NewWideUIntObj\fR, and \fBTcl_NewBignumObj\fR routines each create and return a new Tcl value initialized to the integral value of the argument. The returned Tcl value is unshared. .PP The \fBTcl_SetIntObj\fR, \fBTcl_SetLongObj\fR, \fBTcl_SetWideIntObj\fR, -\fBTcl_SetWideUIntObj\fR, \fBTcl_SetIndexObj\fR, and \fBTcl_SetBignumObj\fR +\fBTcl_SetWideUIntObj\fR, and \fBTcl_SetBignumObj\fR routines each set the value of an existing Tcl value pointed to by \fIobjPtr\fR to the integral value provided by the other argument. The \fIobjPtr\fR argument must point to an unshared Tcl value. Any attempt to set the diff --git a/generic/tclDecls.h b/generic/tclDecls.h index dc942b0..e497928 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -4086,14 +4086,6 @@ extern const TclStubs *tclStubsPtr; #define Tcl_BackgroundError(interp) Tcl_BackgroundException((interp), TCL_ERROR) #define Tcl_StringMatch(str, pattern) Tcl_StringCaseMatch((str), (pattern), 0) -#if TCL_MAJOR_VERSION > 8 -# define Tcl_NewIndexObj(value) (((Tcl_WideUInt)(value) > (((size_t)-1)>>1)) ? Tcl_NewWideIntObj(-1) : Tcl_NewWideIntObj(value)) -# define Tcl_SetIndexObj(objPtr, value) (((Tcl_WideUInt)(value) > (((size_t)-1)>>1)) ? Tcl_SetWideIntObj(objPtr, -1) : Tcl_SetWideUIntObj(objPtr, value)) -#else -# define Tcl_NewIndexObj Tcl_NewIntObj -# define Tcl_SetIndexObj Tcl_SetIntObj -#endif - #if TCL_UTF_MAX < 4 # undef Tcl_UniCharToUtfDString # define Tcl_UniCharToUtfDString Tcl_Char16ToUtfDString |