diff options
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r-- | generic/tclThread.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c index 46e4139..d1f2691 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -83,16 +83,17 @@ Tcl_GetThreadData( /* * Initialize the key for this thread. */ + result = TclThreadStorageKeyGet(keyPtr); if (result == NULL) { - result = ckalloc((size_t)size); + result = ckalloc(size); memset(result, 0, (size_t) size); TclThreadStorageKeySet(keyPtr, result); } #else /* TCL_THREADS */ if (*keyPtr == NULL) { - result = ckalloc((size_t)size); + result = ckalloc(size); memset(result, 0, (size_t)size); *keyPtr = result; RememberSyncObject(keyPtr, &keyRecord); @@ -178,14 +179,14 @@ RememberSyncObject( if (recPtr->num >= recPtr->max) { recPtr->max += 8; - newList = (void **) ckalloc(recPtr->max * sizeof(void *)); + newList = ckalloc(recPtr->max * sizeof(void *)); for (i=0,j=0 ; i<recPtr->num ; i++) { if (recPtr->list[i] != NULL) { newList[j++] = recPtr->list[i]; } } if (recPtr->list != NULL) { - ckfree((char *) recPtr->list); + ckfree(recPtr->list); } recPtr->list = newList; recPtr->num = j; @@ -397,7 +398,7 @@ TclFinalizeSynchronization(void) blockPtr = *keyPtr; ckfree(blockPtr); } - ckfree((char *) keyRecord.list); + ckfree(keyRecord.list); keyRecord.list = NULL; } keyRecord.max = 0; @@ -417,7 +418,7 @@ TclFinalizeSynchronization(void) } } if (mutexRecord.list != NULL) { - ckfree((char *) mutexRecord.list); + ckfree(mutexRecord.list); mutexRecord.list = NULL; } mutexRecord.max = 0; @@ -430,7 +431,7 @@ TclFinalizeSynchronization(void) } } if (condRecord.list != NULL) { - ckfree((char *) condRecord.list); + ckfree(condRecord.list); condRecord.list = NULL; } condRecord.max = 0; |