From 9a6a7030e80397a55a4ee8d090ec9f85b585f13d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 24 May 2023 10:31:56 +0000 Subject: Remove TCL_SIZE_SMAX, not used anywhere. Some more variable which should have been Tcl_Size --- generic/tclInt.h | 6 ------ generic/tclUtil.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index a7d0395..497c3a5 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -105,12 +105,6 @@ #endif /* - * Maximum *signed* value that can be stored in a Tcl_Size type. This is - * primarily used for checking overflows in dynamically allocating memory. - */ -#define TCL_SIZE_SMAX ((((Tcl_Size) 1) << ((8*(Tcl_Size)sizeof(Tcl_Size)) - 1)) - 1) - -/* * Macros used to cast between pointers and integers (e.g. when storing an int * in ClientData), on 64-bit architectures they avoid gcc warning about "cast * to/from pointer from/to integer of different size". diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 67c7bc1..cf6dc75 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1035,10 +1035,10 @@ TclScanElement( * needs protection or escape. */ int requireEscape = 0; /* Force use of CONVERT_ESCAPE mode. For some * reason bare or brace-quoted form fails. */ - int extra = 0; /* Count of number of extra bytes needed for + Tcl_Size extra = 0; /* Count of number of extra bytes needed for * formatted element, assuming we use escape * sequences in formatting. */ - TCL_HASH_TYPE bytesNeeded; /* Buffer length computed to complete the + Tcl_Size bytesNeeded; /* Buffer length computed to complete the * element formatting in the selected mode. */ #if COMPAT int preferEscape = 0; /* Use preferences to track whether to use */ -- cgit v0.12