diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:46:42 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:46:42 (GMT) |
commit | 4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f (patch) | |
tree | d5db4ca8a1fecbd63d9e72730fad2f404367daff /generic/tclThreadStorage.c | |
parent | 63994a73e3f641451b26f48f697b6a069863751c (diff) | |
parent | 52e543c5691a60c3ef802fecf1ae08e7efcf19b7 (diff) | |
download | tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.zip tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.gz tcl-4af90e27e5e22978b56d6cb5d0d1ecd90af0f48f.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclThreadStorage.c')
-rw-r--r-- | generic/tclThreadStorage.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclThreadStorage.c b/generic/tclThreadStorage.c index 339cc71..72f0c2f 100644 --- a/generic/tclThreadStorage.c +++ b/generic/tclThreadStorage.c @@ -85,14 +85,14 @@ TSDTableCreate(void) TSDTable *tsdTablePtr; sig_atomic_t i; - tsdTablePtr = TclpSysAlloc(sizeof(TSDTable)); + tsdTablePtr = (TSDTable *)TclpSysAlloc(sizeof(TSDTable)); if (tsdTablePtr == NULL) { Tcl_Panic("unable to allocate TSDTable"); } tsdTablePtr->allocated = 8; tsdTablePtr->tablePtr = - TclpSysAlloc(sizeof(void *) * tsdTablePtr->allocated); + (void **)TclpSysAlloc(sizeof(void *) * tsdTablePtr->allocated); if (tsdTablePtr->tablePtr == NULL) { Tcl_Panic("unable to allocate TSDTable"); } @@ -148,15 +148,15 @@ TSDTableGrow( sig_atomic_t atLeast) { sig_atomic_t newAllocated = tsdTablePtr->allocated * 2; - ClientData *newTablePtr; + void **newTablePtr; sig_atomic_t i; if (newAllocated <= atLeast) { newAllocated = atLeast + 10; } - newTablePtr = TclpSysRealloc(tsdTablePtr->tablePtr, - sizeof(ClientData) * newAllocated); + newTablePtr = (void **)TclpSysRealloc(tsdTablePtr->tablePtr, + sizeof(void *) * newAllocated); if (newTablePtr == NULL) { Tcl_Panic("unable to reallocate TSDTable"); } @@ -189,7 +189,7 @@ void * TclThreadStorageKeyGet( Tcl_ThreadDataKey *dataKeyPtr) { - TSDTable *tsdTablePtr = TclpThreadGetMasterTSD(tsdMaster.key); + TSDTable *tsdTablePtr = (TSDTable *)TclpThreadGetMasterTSD(tsdMaster.key); ClientData resultPtr = NULL; TSDUnion *keyPtr = (TSDUnion *) dataKeyPtr; sig_atomic_t offset = keyPtr->offset; @@ -223,7 +223,7 @@ TclThreadStorageKeySet( Tcl_ThreadDataKey *dataKeyPtr, void *value) { - TSDTable *tsdTablePtr = TclpThreadGetMasterTSD(tsdMaster.key); + TSDTable *tsdTablePtr = (TSDTable *)TclpThreadGetMasterTSD(tsdMaster.key); TSDUnion *keyPtr = (TSDUnion *) dataKeyPtr; if (tsdTablePtr == NULL) { @@ -288,7 +288,7 @@ TclThreadStorageKeySet( void TclFinalizeThreadDataThread(void) { - TSDTable *tsdTablePtr = TclpThreadGetMasterTSD(tsdMaster.key); + TSDTable *tsdTablePtr = (TSDTable *)TclpThreadGetMasterTSD(tsdMaster.key); if (tsdTablePtr != NULL) { TSDTableDelete(tsdTablePtr); |