summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tcl.decls4
-rw-r--r--generic/tclDictObj.c4
-rw-r--r--generic/tclEncoding.c2
-rw-r--r--generic/tclEvent.c2
-rw-r--r--generic/tclExecute.c30
-rw-r--r--generic/tclHash.c24
-rw-r--r--generic/tclListObj.c2
-rw-r--r--generic/tclLiteral.c4
-rw-r--r--generic/tclObj.c4
-rw-r--r--unix/tclUnixInit.c6
-rw-r--r--unix/tclUnixThrd.c4
-rw-r--r--win/tclWinInit.c2
-rw-r--r--win/tclWinSock.c2
-rw-r--r--win/tclWinThrd.c2
14 files changed, 46 insertions, 46 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls
index be45333..0d13dc3 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -267,7 +267,7 @@ declare 65 {
# Removed in 9.0, replaced by macro.
#declare 67 {
# void Tcl_AddObjErrorInfo(Tcl_Interp *interp, const char *message,
-# int length)
+# Tcl_Size length)
#}
declare 68 {
void Tcl_AllowExceptions(Tcl_Interp *interp)
@@ -1317,7 +1317,7 @@ declare 356 {
# Removed in 9.0:
#declare 357 {
# Tcl_Obj *Tcl_EvalTokens(Tcl_Interp *interp, Tcl_Token *tokenPtr,
-# int count)
+# Tcl_Size count)
#}
declare 358 {
void Tcl_FreeParse(Tcl_Parse *parsePtr)
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index 64d666f..3f076f8 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -131,7 +131,7 @@ typedef struct Dict {
* the dictionary. Used for doing traversal of
* the entries in the order that they are
* created. */
- TCL_HASH_TYPE epoch; /* Epoch counter */
+ size_t epoch; /* Epoch counter */
size_t refCount; /* Reference counter (see above) */
Tcl_Obj *chain; /* Linked list used for invalidating the
* string representations of updated nested
@@ -503,7 +503,7 @@ UpdateStringOfDict(
ChainEntry *cPtr;
Tcl_Obj *keyPtr, *valuePtr;
Tcl_Size i, length;
- TCL_HASH_TYPE bytesNeeded = 0;
+ size_t bytesNeeded = 0;
const char *elem;
char *dst;
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index c72122c..699d31f 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -4339,7 +4339,7 @@ unilen4(
static void
InitializeEncodingSearchPath(
char **valuePtr,
- TCL_HASH_TYPE *lengthPtr,
+ size_t *lengthPtr,
Tcl_Encoding *encodingPtr)
{
const char *bytes;
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 4365984..e10a669 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -2055,7 +2055,7 @@ Tcl_CreateThread(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread */
Tcl_ThreadCreateProc *proc, /* Main() function of the thread */
void *clientData, /* The one argument to Main() */
- TCL_HASH_TYPE stackSize, /* Size of stack for the new thread */
+ size_t stackSize, /* Size of stack for the new thread */
int flags) /* Flags controlling behaviour of the new
* thread. */
{
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 32de619..bc53420 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -635,7 +635,7 @@ static ExceptionRange * GetExceptRangeForPc(const unsigned char *pc,
static const char * GetSrcInfoForPc(const unsigned char *pc,
ByteCode *codePtr, Tcl_Size *lengthPtr,
const unsigned char **pcBeg, Tcl_Size *cmdIdxPtr);
-static Tcl_Obj ** GrowEvaluationStack(ExecEnv *eePtr, TCL_HASH_TYPE growth,
+static Tcl_Obj ** GrowEvaluationStack(ExecEnv *eePtr, size_t growth,
int move);
static void IllegalExprOperandType(Tcl_Interp *interp,
const unsigned char *pc, Tcl_Obj *opndPtr);
@@ -643,8 +643,8 @@ static void InitByteCodeExecution(Tcl_Interp *interp);
static inline int wordSkip(void *ptr);
static void ReleaseDictIterator(Tcl_Obj *objPtr);
/* Useful elsewhere, make available in tclInt.h or stubs? */
-static Tcl_Obj ** StackAllocWords(Tcl_Interp *interp, TCL_HASH_TYPE numWords);
-static Tcl_Obj ** StackReallocWords(Tcl_Interp *interp, TCL_HASH_TYPE numWords);
+static Tcl_Obj ** StackAllocWords(Tcl_Interp *interp, size_t numWords);
+static Tcl_Obj ** StackReallocWords(Tcl_Interp *interp, size_t numWords);
static Tcl_NRPostProc CopyCallback;
static Tcl_NRPostProc ExprObjCallback;
static Tcl_NRPostProc FinalizeOONext;
@@ -792,7 +792,7 @@ ExecEnv *
TclCreateExecEnv(
Tcl_Interp *interp, /* Interpreter for which the execution
* environment is being created. */
- TCL_HASH_TYPE size) /* The initial stack size, in number of words
+ size_t size) /* The initial stack size, in number of words
* [sizeof(Tcl_Obj*)] */
{
ExecEnv *eePtr = (ExecEnv *)Tcl_Alloc(sizeof(ExecEnv));
@@ -974,12 +974,12 @@ static Tcl_Obj **
GrowEvaluationStack(
ExecEnv *eePtr, /* Points to the ExecEnv with an evaluation
* stack to enlarge. */
- TCL_HASH_TYPE growth1, /* How much larger than the current used
+ size_t growth1, /* How much larger than the current used
* size. */
int move) /* 1 if move words since last marker. */
{
ExecStack *esPtr = eePtr->execStackPtr, *oldPtr = NULL;
- TCL_HASH_TYPE newBytes;
+ size_t newBytes;
Tcl_Size growth = growth1;
Tcl_Size newElems, currElems, needed = growth - (esPtr->endPtr - esPtr->tosPtr);
Tcl_Obj **markerPtr = esPtr->markerPtr, **memStart;
@@ -1126,7 +1126,7 @@ GrowEvaluationStack(
static Tcl_Obj **
StackAllocWords(
Tcl_Interp *interp,
- TCL_HASH_TYPE numWords)
+ size_t numWords)
{
/*
* Note that GrowEvaluationStack sets a marker in the stack. This marker
@@ -1144,7 +1144,7 @@ StackAllocWords(
static Tcl_Obj **
StackReallocWords(
Tcl_Interp *interp,
- TCL_HASH_TYPE numWords)
+ size_t numWords)
{
Interp *iPtr = (Interp *) interp;
ExecEnv *eePtr = iPtr->execEnvPtr;
@@ -1223,10 +1223,10 @@ TclStackFree(
void *
TclStackAlloc(
Tcl_Interp *interp,
- TCL_HASH_TYPE numBytes)
+ size_t numBytes)
{
Interp *iPtr = (Interp *) interp;
- TCL_HASH_TYPE numWords;
+ size_t numWords;
if (iPtr == NULL || iPtr->execEnvPtr == NULL) {
return Tcl_Alloc(numBytes);
@@ -1239,13 +1239,13 @@ void *
TclStackRealloc(
Tcl_Interp *interp,
void *ptr,
- TCL_HASH_TYPE numBytes)
+ size_t numBytes)
{
Interp *iPtr = (Interp *) interp;
ExecEnv *eePtr;
ExecStack *esPtr;
Tcl_Obj **markerPtr;
- TCL_HASH_TYPE numWords;
+ size_t numWords;
if (iPtr == NULL || iPtr->execEnvPtr == NULL) {
return Tcl_Realloc(ptr, numBytes);
@@ -1888,10 +1888,10 @@ TclNRExecuteByteCode(
{
Interp *iPtr = (Interp *) interp;
TEBCdata *TD;
- TCL_HASH_TYPE size = sizeof(TEBCdata) - 1
+ size_t size = sizeof(TEBCdata) - 1
+ (codePtr->maxStackDepth + codePtr->maxExceptDepth)
* sizeof(void *);
- TCL_HASH_TYPE numWords = (size + sizeof(Tcl_Obj *) - 1) / sizeof(Tcl_Obj *);
+ size_t numWords = (size + sizeof(Tcl_Obj *) - 1) / sizeof(Tcl_Obj *);
TclPreserveByteCode(codePtr);
@@ -5101,7 +5101,7 @@ TEBCresume(
case INST_LREPLACE4:
{
- TCL_HASH_TYPE numToDelete, numNewElems;
+ size_t numToDelete, numNewElems;
int end_indicator;
int haveSecondIndex, flags;
Tcl_Obj *fromIdxObj, *toIdxObj;
diff --git a/generic/tclHash.c b/generic/tclHash.c
index cb1e3c7..4703cd2 100644
--- a/generic/tclHash.c
+++ b/generic/tclHash.c
@@ -36,7 +36,7 @@
static Tcl_HashEntry * AllocArrayEntry(Tcl_HashTable *tablePtr, void *keyPtr);
static int CompareArrayKeys(void *keyPtr, Tcl_HashEntry *hPtr);
-static TCL_HASH_TYPE HashArrayKey(Tcl_HashTable *tablePtr, void *keyPtr);
+static size_t HashArrayKey(Tcl_HashTable *tablePtr, void *keyPtr);
/*
* Prototypes for the string hash key methods.
@@ -45,7 +45,7 @@ static TCL_HASH_TYPE HashArrayKey(Tcl_HashTable *tablePtr, void *keyPtr);
static Tcl_HashEntry * AllocStringEntry(Tcl_HashTable *tablePtr,
void *keyPtr);
static int CompareStringKeys(void *keyPtr, Tcl_HashEntry *hPtr);
-static TCL_HASH_TYPE HashStringKey(Tcl_HashTable *tablePtr, void *keyPtr);
+static size_t HashStringKey(Tcl_HashTable *tablePtr, void *keyPtr);
/*
* Function prototypes for static functions in this file:
@@ -247,7 +247,7 @@ CreateHashEntry(
{
Tcl_HashEntry *hPtr;
const Tcl_HashKeyType *typePtr;
- TCL_HASH_TYPE hash, index;
+ size_t hash, index;
if (tablePtr->keyType == TCL_STRING_KEYS) {
typePtr = &tclStringHashKeyType;
@@ -369,7 +369,7 @@ Tcl_DeleteHashEntry(
const Tcl_HashKeyType *typePtr;
Tcl_HashTable *tablePtr;
Tcl_HashEntry **bucketPtr;
- TCL_HASH_TYPE index;
+ size_t index;
tablePtr = entryPtr->tablePtr;
@@ -588,7 +588,7 @@ Tcl_HashStats(
{
#define NUM_COUNTERS 10
Tcl_Size i;
- TCL_HASH_TYPE count[NUM_COUNTERS], overflow, j;
+ size_t count[NUM_COUNTERS], overflow, j;
double average, tmp;
Tcl_HashEntry *hPtr;
char *result, *p;
@@ -660,8 +660,8 @@ AllocArrayEntry(
void *keyPtr) /* Key to store in the hash table entry. */
{
Tcl_HashEntry *hPtr;
- TCL_HASH_TYPE count = tablePtr->keyType * sizeof(int);
- TCL_HASH_TYPE size = offsetof(Tcl_HashEntry, key) + count;
+ size_t count = tablePtr->keyType * sizeof(int);
+ size_t size = offsetof(Tcl_HashEntry, key) + count;
if (size < sizeof(Tcl_HashEntry)) {
size = sizeof(Tcl_HashEntry);
@@ -719,13 +719,13 @@ CompareArrayKeys(
*----------------------------------------------------------------------
*/
-static TCL_HASH_TYPE
+static size_t
HashArrayKey(
Tcl_HashTable *tablePtr, /* Hash table. */
void *keyPtr) /* Key from which to compute hash value. */
{
const int *array = (const int *) keyPtr;
- TCL_HASH_TYPE result;
+ size_t result;
int count;
for (result = 0, count = tablePtr->keyType; count > 0;
@@ -813,13 +813,13 @@ CompareStringKeys(
*----------------------------------------------------------------------
*/
-static TCL_HASH_TYPE
+static size_t
HashStringKey(
TCL_UNUSED(Tcl_HashTable *),
void *keyPtr) /* Key from which to compute hash value. */
{
const char *string = (const char *)keyPtr;
- TCL_HASH_TYPE result;
+ size_t result;
char c;
/*
@@ -937,7 +937,7 @@ static void
RebuildTable(
Tcl_HashTable *tablePtr) /* Table to enlarge. */
{
- TCL_HASH_TYPE count, index, oldSize = tablePtr->numBuckets;
+ size_t count, index, oldSize = tablePtr->numBuckets;
Tcl_HashEntry **oldBuckets = tablePtr->buckets;
Tcl_HashEntry **oldChainPtr, **newChainPtr;
Tcl_HashEntry *hPtr;
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 546f444..ae44e67 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -3480,7 +3480,7 @@ UpdateStringOfList(
# define LOCAL_SIZE 64
char localFlags[LOCAL_SIZE], *flagPtr = NULL;
Tcl_Size numElems, i, length;
- TCL_HASH_TYPE bytesNeeded = 0;
+ size_t bytesNeeded = 0;
const char *elem, *start;
char *dst;
Tcl_Obj **elemPtrs;
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 9051b45..9d89586 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -179,7 +179,7 @@ TclCreateLiteral(
const char *bytes, /* The start of the string. Note that this is
* not a NUL-terminated string. */
Tcl_Size length, /* Number of bytes in the string. */
- TCL_HASH_TYPE hash, /* The string's hash. If the value is
+ size_t hash, /* The string's hash. If the value is
* TCL_INDEX_NONE, it will be computed here. */
int *newPtr,
Namespace *nsPtr,
@@ -195,7 +195,7 @@ TclCreateLiteral(
* Is it in the interpreter's global literal table?
*/
- if (hash == (TCL_HASH_TYPE) TCL_INDEX_NONE) {
+ if (hash == (size_t) TCL_INDEX_NONE) {
hash = HashString(bytes, length);
}
globalHash = (hash & globalTablePtr->mask);
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 6dcd733..c443f18 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -4154,7 +4154,7 @@ TclFreeObjEntry(
*----------------------------------------------------------------------
*/
-TCL_HASH_TYPE
+size_t
TclHashObjKey(
TCL_UNUSED(Tcl_HashTable *),
void *keyPtr) /* Key from which to compute hash value. */
@@ -4162,7 +4162,7 @@ TclHashObjKey(
Tcl_Obj *objPtr = (Tcl_Obj *)keyPtr;
Tcl_Size length;
const char *string = Tcl_GetStringFromObj(objPtr, &length);
- TCL_HASH_TYPE result = 0;
+ size_t result = 0;
/*
* I tried a zillion different hash functions and asked many other people
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index 9c84657..982c36b 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -455,7 +455,7 @@ TclpInitPlatform(void)
void
TclpInitLibraryPath(
char **valuePtr,
- TCL_HASH_TYPE *lengthPtr,
+ size_t *lengthPtr,
Tcl_Encoding *encodingPtr)
{
#define LIBRARY_SIZE 32
@@ -546,9 +546,9 @@ TclpInitLibraryPath(
*encodingPtr = Tcl_GetEncoding(NULL, NULL);
/*
- * Note lengthPtr is (TCL_HASH_TYPE *) which is unsigned so cannot
+ * Note lengthPtr is (size_t *) which is unsigned so cannot
* pass directly to Tcl_GetStringFromObj.
- * TODO - why is the type TCL_HASH_TYPE anyways?
+ * TODO - why is the type size_t anyways?
*/
Tcl_Size length;
str = Tcl_GetStringFromObj(pathPtr, &length);
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 5d357c9..71e451f 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -214,7 +214,7 @@ TclpThreadCreate(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread */
Tcl_ThreadCreateProc *proc, /* Main() function of the thread */
void *clientData, /* The one argument to Main() */
- TCL_HASH_TYPE stackSize, /* Size of stack for the new thread */
+ size_t stackSize, /* Size of stack for the new thread */
int flags) /* Flags controlling behaviour of the new
* thread. */
{
@@ -228,7 +228,7 @@ TclpThreadCreate(
#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
if (stackSize != TCL_THREAD_STACK_DEFAULT) {
- pthread_attr_setstacksize(&attr, (size_t)stackSize);
+ pthread_attr_setstacksize(&attr, stackSize);
#ifdef TCL_THREAD_STACK_MIN
} else {
/*
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index d682006..b506111 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -124,7 +124,7 @@ TclpInitPlatform(void)
void
TclpInitLibraryPath(
char **valuePtr,
- TCL_HASH_TYPE *lengthPtr,
+ size_t *lengthPtr,
Tcl_Encoding *encodingPtr)
{
#define LIBRARY_SIZE 64
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 8de4b50..5284ced 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -345,7 +345,7 @@ printaddrinfolist(
void
InitializeHostName(
char **valuePtr,
- TCL_HASH_TYPE *lengthPtr,
+ size_t *lengthPtr,
Tcl_Encoding *encodingPtr)
{
WCHAR wbuf[256];
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index c7f0ba7..37e0841 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -204,7 +204,7 @@ TclpThreadCreate(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread. */
Tcl_ThreadCreateProc *proc, /* Main() function of the thread. */
void *clientData, /* The one argument to Main(). */
- TCL_HASH_TYPE stackSize, /* Size of stack for the new thread. */
+ size_t stackSize, /* Size of stack for the new thread. */
int flags) /* Flags controlling behaviour of the new
* thread. */
{