diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:06:07 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-02-28 12:06:07 (GMT) |
| commit | 52e543c5691a60c3ef802fecf1ae08e7efcf19b7 (patch) | |
| tree | 1f02ba454f2725719d80901eef77168723e980f7 /unix/tclUnixThrd.c | |
| parent | f9ddbba3d621449f2cb1b2a4d0a94927b48391eb (diff) | |
| parent | 24a416ad3867b536dd613454c6f07df349f797f2 (diff) | |
| download | tcl-52e543c5691a60c3ef802fecf1ae08e7efcf19b7.zip tcl-52e543c5691a60c3ef802fecf1ae08e7efcf19b7.tar.gz tcl-52e543c5691a60c3ef802fecf1ae08e7efcf19b7.tar.bz2 | |
Implement TIP #557: C++ support for Tcl
Diffstat (limited to 'unix/tclUnixThrd.c')
| -rw-r--r-- | unix/tclUnixThrd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 054a5d2..795c62c 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -577,7 +577,7 @@ Tcl_MutexLock( * Double inside master lock check to avoid a race condition. */ - pmutexPtr = ckalloc(sizeof(PMutex)); + pmutexPtr = (PMutex *)ckalloc(sizeof(PMutex)); PMutexInit(pmutexPtr); *mutexPtr = (Tcl_Mutex) pmutexPtr; TclRememberMutex(mutexPtr); @@ -687,7 +687,7 @@ Tcl_ConditionWait( */ if (*condPtr == NULL) { - pcondPtr = ckalloc(sizeof(pthread_cond_t)); + pcondPtr = (pthread_cond_t *)ckalloc(sizeof(pthread_cond_t)); pthread_cond_init(pcondPtr, NULL); *condPtr = (Tcl_Condition) pcondPtr; TclRememberCondition(condPtr); @@ -846,7 +846,7 @@ TclpNewAllocMutex(void) AllocMutex *lockPtr; PMutex *plockPtr; - lockPtr = malloc(sizeof(AllocMutex)); + lockPtr = (AllocMutex *)malloc(sizeof(AllocMutex)); if (lockPtr == NULL) { Tcl_Panic("could not allocate lock"); } @@ -917,7 +917,7 @@ TclpThreadCreateKey(void) { pthread_key_t *ptkeyPtr; - ptkeyPtr = TclpSysAlloc(sizeof(pthread_key_t), 0); + ptkeyPtr = (pthread_key_t *)TclpSysAlloc(sizeof(pthread_key_t), 0); if (NULL == ptkeyPtr) { Tcl_Panic("unable to allocate thread key!"); } @@ -933,7 +933,7 @@ void TclpThreadDeleteKey( void *keyPtr) { - pthread_key_t *ptkeyPtr = keyPtr; + pthread_key_t *ptkeyPtr = (pthread_key_t *)keyPtr; if (pthread_key_delete(*ptkeyPtr)) { Tcl_Panic("unable to delete key!"); @@ -947,7 +947,7 @@ TclpThreadSetMasterTSD( void *tsdKeyPtr, void *ptr) { - pthread_key_t *ptkeyPtr = tsdKeyPtr; + pthread_key_t *ptkeyPtr = (pthread_key_t *)tsdKeyPtr; if (pthread_setspecific(*ptkeyPtr, ptr)) { Tcl_Panic("unable to set master TSD value"); @@ -958,7 +958,7 @@ void * TclpThreadGetMasterTSD( void *tsdKeyPtr) { - pthread_key_t *ptkeyPtr = tsdKeyPtr; + pthread_key_t *ptkeyPtr = (pthread_key_t*)tsdKeyPtr; return pthread_getspecific(*ptkeyPtr); } |
