diff options
author | nijtmans <nijtmans> | 2009-02-10 23:08:56 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2009-02-10 23:08:56 (GMT) |
commit | bfcd65034eb86288bb554aef03df7c98101c3089 (patch) | |
tree | a407af9f40cff9d5a67f7ecf3a88b22578e0f842 /generic/tclThread.c | |
parent | b07274fff759a29a06f8c988c019d09d583fe435 (diff) | |
download | tcl-bfcd65034eb86288bb554aef03df7c98101c3089.zip tcl-bfcd65034eb86288bb554aef03df7c98101c3089.tar.gz tcl-bfcd65034eb86288bb554aef03df7c98101c3089.tar.bz2 |
- eliminate some unnessary type casts
- some internal const decorations
- spacing
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r-- | generic/tclThread.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c index 7d5d4dd..a538316 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclThread.c,v 1.22 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclThread.c,v 1.23 2009/02/10 23:09:06 nijtmans Exp $ */ #include "tclInt.h" @@ -27,7 +27,7 @@ typedef struct { int num; /* Number of objects remembered */ int max; /* Max size of the array */ - char **list; /* List of pointers */ + void **list; /* List of pointers */ } SyncObjRecord; static SyncObjRecord keyRecord = {0, 0, NULL}; @@ -38,8 +38,8 @@ static SyncObjRecord condRecord = {0, 0, NULL}; * Prototypes of functions used only in this file. */ -static void ForgetSyncObject(char *objPtr, SyncObjRecord *recPtr); -static void RememberSyncObject(char *objPtr, +static void ForgetSyncObject(void *objPtr, SyncObjRecord *recPtr); +static void RememberSyncObject(void *objPtr, SyncObjRecord *recPtr); /* @@ -97,7 +97,7 @@ Tcl_GetThreadData( result = ckalloc((size_t)size); memset(result, 0, (size_t)size); *keyPtr = result; - RememberSyncObject((char *) keyPtr, &keyRecord); + RememberSyncObject(keyPtr, &keyRecord); } else { result = *keyPtr; } @@ -156,10 +156,10 @@ TclThreadDataKeyGet( static void RememberSyncObject( - char *objPtr, /* Pointer to sync object */ + void *objPtr, /* Pointer to sync object */ SyncObjRecord *recPtr) /* Record of sync objects */ { - char **newList; + void **newList; int i, j; @@ -181,7 +181,7 @@ RememberSyncObject( if (recPtr->num >= recPtr->max) { recPtr->max += 8; - newList = (char **) ckalloc(recPtr->max * sizeof(char *)); + newList = (void **) ckalloc(recPtr->max * sizeof(void *)); for (i=0,j=0 ; i<recPtr->num ; i++) { if (recPtr->list[i] != NULL) { newList[j++] = recPtr->list[i]; @@ -217,7 +217,7 @@ RememberSyncObject( static void ForgetSyncObject( - char *objPtr, /* Pointer to sync object */ + void *objPtr, /* Pointer to sync object */ SyncObjRecord *recPtr) /* Record of sync objects */ { int i; @@ -251,7 +251,7 @@ void TclRememberMutex( Tcl_Mutex *mutexPtr) { - RememberSyncObject((char *)mutexPtr, &mutexRecord); + RememberSyncObject(mutexPtr, &mutexRecord); } /* @@ -279,7 +279,7 @@ Tcl_MutexFinalize( TclpFinalizeMutex(mutexPtr); #endif TclpMasterLock(); - ForgetSyncObject((char *) mutexPtr, &mutexRecord); + ForgetSyncObject(mutexPtr, &mutexRecord); TclpMasterUnlock(); } @@ -304,7 +304,7 @@ void TclRememberCondition( Tcl_Condition *condPtr) { - RememberSyncObject((char *) condPtr, &condRecord); + RememberSyncObject(condPtr, &condRecord); } /* @@ -332,7 +332,7 @@ Tcl_ConditionFinalize( TclpFinalizeCondition(condPtr); #endif TclpMasterLock(); - ForgetSyncObject((char *) condPtr, &condRecord); + ForgetSyncObject(condPtr, &condRecord); TclpMasterUnlock(); } |