From b58023ffa18027e959e9f2e56118606adfe8343a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 21 Apr 2023 20:32:26 +0000 Subject: Since Tcl_GetSizeIntFromObj is the same as Tcl_GetIntFromObj (in 8.7), it's not worth to spend a stub entry for it --- generic/tcl.decls | 6 ------ generic/tclDecls.h | 12 ++++++------ generic/tclObj.c | 25 ------------------------- generic/tclStubInit.c | 2 +- 4 files changed, 7 insertions(+), 38 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index 6ac10cb..daa2f2b 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2567,12 +2567,6 @@ declare 685 { Tcl_Obj *Tcl_DStringToObj(Tcl_DString *dsPtr) } -# TIP 660 -declare 686 { - int Tcl_GetSizeIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, - Tcl_Size *sizePtr) -} - # ----- BASELINE -- FOR -- 8.7.0 / 9.0.0 ----- # declare 688 { diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 9c3ca0d..d4e4381 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -2049,9 +2049,7 @@ EXTERN int Tcl_GetWideUIntFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 685 */ EXTERN Tcl_Obj * Tcl_DStringToObj(Tcl_DString *dsPtr); -/* 686 */ -EXTERN int Tcl_GetSizeIntFromObj(Tcl_Interp *interp, - Tcl_Obj *objPtr, Tcl_Size *sizePtr); +/* Slot 686 is reserved */ /* Slot 687 is reserved */ /* 688 */ EXTERN void TclUnusedStubEntry(void); @@ -2776,7 +2774,7 @@ typedef struct TclStubs { Tcl_Size (*tcl_GetEncodingNulLength) (Tcl_Encoding encoding); /* 683 */ int (*tcl_GetWideUIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_WideUInt *uwidePtr); /* 684 */ Tcl_Obj * (*tcl_DStringToObj) (Tcl_DString *dsPtr); /* 685 */ - int (*tcl_GetSizeIntFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Size *sizePtr); /* 686 */ + void (*reserved686)(void); void (*reserved687)(void); void (*tclUnusedStubEntry) (void); /* 688 */ } TclStubs; @@ -4181,8 +4179,7 @@ extern const TclStubs *tclStubsPtr; (tclStubsPtr->tcl_GetWideUIntFromObj) /* 684 */ #define Tcl_DStringToObj \ (tclStubsPtr->tcl_DStringToObj) /* 685 */ -#define Tcl_GetSizeIntFromObj \ - (tclStubsPtr->tcl_GetSizeIntFromObj) /* 686 */ +/* Slot 686 is reserved */ /* Slot 687 is reserved */ #define TclUnusedStubEntry \ (tclStubsPtr->tclUnusedStubEntry) /* 688 */ @@ -4586,4 +4583,7 @@ extern const TclStubs *tclStubsPtr; #define Tcl_GetSlave Tcl_GetChild #define Tcl_GetMaster Tcl_GetParent +/* TIP #660 */ +#define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj + #endif /* _TCLDECLS */ diff --git a/generic/tclObj.c b/generic/tclObj.c index 93e3a08..94cf376 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3551,31 +3551,6 @@ TclGetWideBitsFromObj( /* *---------------------------------------------------------------------- * - * Tcl_GetSizeIntFromObj -- - * - * Attempt to return a Tcl_Size from the Tcl object "objPtr". - * - * Results: - * TCL_OK - the converted Tcl_Size value is stored in *sizePtr - * TCL_ERROR - the error message is stored in interp - * - * Side effects: - * The function may free up any existing internal representation. - * - *---------------------------------------------------------------------- - */ -int -Tcl_GetSizeIntFromObj( - Tcl_Interp *interp, /* Used for error reporting if not NULL. */ - Tcl_Obj *objPtr, /* The object from which to get a int. */ - Tcl_Size *sizePtr) /* Place to store resulting int. */ -{ - return Tcl_GetIntFromObj(interp, objPtr, sizePtr); -} - -/* - *---------------------------------------------------------------------- - * * FreeBignum -- * * This function frees the internal rep of a bignum. diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 104375e..e09d74d 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -2057,7 +2057,7 @@ const TclStubs tclStubs = { Tcl_GetEncodingNulLength, /* 683 */ Tcl_GetWideUIntFromObj, /* 684 */ Tcl_DStringToObj, /* 685 */ - Tcl_GetSizeIntFromObj, /* 686 */ + 0, /* 686 */ 0, /* 687 */ TclUnusedStubEntry, /* 688 */ }; -- cgit v0.12