summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-08-22 18:53:25 (GMT)
committernijtmans <nijtmans>2010-08-22 18:53:25 (GMT)
commitb29ec318d79701d5f1a59dda0b4517e2a91d4aa4 (patch)
tree67ed82232eba8af871d2080941a2d38f2764b518
parent83ab4a9db5c51f901442c409a6d33709ab4c223b (diff)
downloadtcl-b29ec318d79701d5f1a59dda0b4517e2a91d4aa4.zip
tcl-b29ec318d79701d5f1a59dda0b4517e2a91d4aa4.tar.gz
tcl-b29ec318d79701d5f1a59dda0b4517e2a91d4aa4.tar.bz2
Remove many type casts which are no longernecessary as a result of [Patch 3009403]: Signature of Tcl_GetHashKey, Tcl_(Create|Find)HashEntry
-rw-r--r--ChangeLog18
-rw-r--r--generic/tclBasic.c10
-rw-r--r--generic/tclBinary.c4
-rw-r--r--generic/tclCmdIL.c6
-rw-r--r--generic/tclCompile.c4
-rw-r--r--generic/tclDictObj.c21
-rw-r--r--generic/tclEncoding.c8
-rw-r--r--generic/tclExecute.c10
-rw-r--r--generic/tclIOCmd.c4
-rw-r--r--generic/tclInterp.c4
-rw-r--r--generic/tclObj.c22
-rw-r--r--generic/tclProc.c6
-rw-r--r--generic/tclTest.c4
-rw-r--r--generic/tclTrace.c4
-rw-r--r--generic/tclUtil.c6
-rw-r--r--generic/tclVar.c24
16 files changed, 85 insertions, 70 deletions
diff --git a/ChangeLog b/ChangeLog
index 392eb60..7d850d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-22 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * generic/tclBasic.c [Patch 3009403]: Signature of Tcl_GetHashKey,
+ * generic/tclBinary.c: Tcl_(Create|Find)HashEntry follow-up:
+ * generic/tclCmdIL.c Remove many type casts which are no longer
+ * generic/tclCompile.c necessary as a result of this signature change.
+ * generic/tclDictObj.c
+ * generic/tclEncoding.c
+ * generic/tclExecute.c
+ * generic/tclInterp.c
+ * generic/tclIOCmd.c
+ * generic/tclObj.c
+ * generic/tclProc.c
+ * generic/tclTest.c
+ * generic/tclTrace.c
+ * generic/tclUtil.c
+ * generic/tclVar.c
+
2010-08-21 Donal K. Fellows <dkf@users.sf.net>
* doc/linsert.n: [Bug 3045123]: Make description of what is actually
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 366e45e..5216f96 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBasic.c,v 1.462 2010/08/18 22:33:26 msofer Exp $
+ * RCS: @(#) $Id: tclBasic.c,v 1.463 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -656,7 +656,7 @@ Tcl_CreateInterp(void)
cancelInfo->length = 0;
Tcl_MutexLock(&cancelLock);
- hPtr = Tcl_CreateHashEntry(&cancelTable, (char *) iPtr, &isNew);
+ hPtr = Tcl_CreateHashEntry(&cancelTable, iPtr, &isNew);
Tcl_SetHashValue(hPtr, cancelInfo);
Tcl_MutexUnlock(&cancelLock);
@@ -5519,7 +5519,7 @@ TclArgumentEnter(
if (cfPtr->line[i] < 0) {
continue;
}
- hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, (char *) objv[i], &new);
+ hPtr = Tcl_CreateHashEntry(iPtr->lineLAPtr, objv[i], &new);
if (new) {
/*
* The word is not on the stack yet, remember the current location
@@ -5652,7 +5652,7 @@ TclArgumentBCEnter(
int isnew;
Tcl_HashEntry *hPtr =
Tcl_CreateHashEntry(iPtr->lineLABCPtr,
- (char *) objv[word], &isnew);
+ objv[word], &isnew);
CFWordBC *cfwPtr = (CFWordBC *) ckalloc(sizeof(CFWordBC));
cfwPtr->framePtr = cfPtr;
@@ -8976,7 +8976,7 @@ TclNRCoroutineObjCmd(
int isNew;
Tcl_HashEntry *newPtr =
Tcl_CreateHashEntry(corPtr->base.lineLABCPtr,
- (char *) Tcl_GetHashKey(iPtr->lineLABCPtr, hePtr),
+ Tcl_GetHashKey(iPtr->lineLABCPtr, hePtr),
&isNew);
Tcl_SetHashValue(newPtr, Tcl_GetHashValue(hePtr));
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 3264a70..1859c0a 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.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: tclBinary.c,v 1.64 2010/04/30 20:52:51 dgp Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.65 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -2114,7 +2114,7 @@ ScanNumber(
register Tcl_HashEntry *hPtr;
int isNew;
- hPtr = Tcl_CreateHashEntry(tablePtr, (char *)value, &isNew);
+ hPtr = Tcl_CreateHashEntry(tablePtr, INT2PTR(value), &isNew);
if (!isNew) {
return Tcl_GetHashValue(hPtr);
}
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 8a38521..6c9a623 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.183 2010/06/22 12:25:16 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.184 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -830,7 +830,7 @@ InfoCommandsCmd(
elemObjPtr = Tcl_NewStringObj(cmdName, -1);
Tcl_ListObjAppendElement(interp, listPtr, elemObjPtr);
(void) Tcl_CreateHashEntry(&addedCommandsTable,
- (char *)elemObjPtr, &isNew);
+ elemObjPtr, &isNew);
}
entryPtr = Tcl_NextHashEntry(&search);
}
@@ -855,7 +855,7 @@ InfoCommandsCmd(
|| Tcl_StringMatch(cmdName, simplePattern)) {
elemObjPtr = Tcl_NewStringObj(cmdName, -1);
(void) Tcl_CreateHashEntry(&addedCommandsTable,
- (char *) elemObjPtr, &isNew);
+ elemObjPtr, &isNew);
if (isNew) {
Tcl_ListObjAppendElement(interp, listPtr, elemObjPtr);
} else {
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 5078a8d..0807151 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.186 2010/05/14 08:22:02 dkf Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.187 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -2486,7 +2486,7 @@ TclInitByteCodeObj(
* byte code object (internal rep), for use with the bc compiler.
*/
- Tcl_SetHashValue(Tcl_CreateHashEntry(iPtr->lineBCPtr, (char *) codePtr,
+ Tcl_SetHashValue(Tcl_CreateHashEntry(iPtr->lineBCPtr, codePtr,
&isNew), envPtr->extCmdMapPtr);
envPtr->extCmdMapPtr = NULL;
diff --git a/generic/tclDictObj.c b/generic/tclDictObj.c
index a2a8dd0..6a17b02 100644
--- a/generic/tclDictObj.c
+++ b/generic/tclDictObj.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDictObj.c,v 1.83 2010/07/15 21:00:26 dkf Exp $
+ * RCS: @(#) $Id: tclDictObj.c,v 1.84 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -259,7 +259,7 @@ CreateChainEntry(
int *newPtr)
{
ChainEntry *cPtr = (ChainEntry *)
- Tcl_CreateHashEntry(&dict->table, (char *) keyPtr, newPtr);
+ Tcl_CreateHashEntry(&dict->table, keyPtr, newPtr);
/*
* If this is a new entry in the hash table, stitch it into the chain.
@@ -287,7 +287,7 @@ DeleteChainEntry(
Tcl_Obj *keyPtr)
{
ChainEntry *cPtr = (ChainEntry *)
- Tcl_FindHashEntry(&dict->table, (char *) keyPtr);
+ Tcl_FindHashEntry(&dict->table, keyPtr);
if (cPtr == NULL) {
return 0;
@@ -352,7 +352,7 @@ DupDictInternalRep(
InitChainTable(newDict);
for (cPtr=oldDict->entryChainHead ; cPtr!=NULL ; cPtr=cPtr->nextPtr) {
- void *key = Tcl_GetHashKey(&oldDict->table, &cPtr->entry);
+ Tcl_Obj *key = Tcl_GetHashKey(&oldDict->table, &cPtr->entry);
Tcl_Obj *valuePtr = Tcl_GetHashValue(&cPtr->entry);
int n;
Tcl_HashEntry *hPtr = CreateChainEntry(newDict, key, &n);
@@ -500,7 +500,7 @@ UpdateStringOfDict(
* elements already.
*/
- keyPtr = (Tcl_Obj *) Tcl_GetHashKey(&dict->table, &cPtr->entry);
+ keyPtr = Tcl_GetHashKey(&dict->table, &cPtr->entry);
elem = TclGetStringFromObj(keyPtr, &length);
dictPtr->length += Tcl_ScanCountedElement(elem, length,
&flagPtr[i]) + 1;
@@ -518,7 +518,7 @@ UpdateStringOfDict(
dictPtr->bytes = ckalloc((unsigned) dictPtr->length);
dst = dictPtr->bytes;
for (i=0,cPtr=dict->entryChainHead; i<numElems; i+=2,cPtr=cPtr->nextPtr) {
- keyPtr = (Tcl_Obj *) Tcl_GetHashKey(&dict->table, &cPtr->entry);
+ keyPtr = Tcl_GetHashKey(&dict->table, &cPtr->entry);
elem = TclGetStringFromObj(keyPtr, &length);
dst += Tcl_ConvertCountedElement(elem, length, dst,
flagPtr[i] | (i==0 ? 0 : TCL_DONT_QUOTE_HASH));
@@ -814,7 +814,7 @@ TclTraceDictPath(
}
for (i=0 ; i<keyc ; i++) {
- Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&dict->table, (char *)keyv[i]);
+ Tcl_HashEntry *hPtr = Tcl_FindHashEntry(&dict->table, keyv[i]);
Tcl_Obj *tmpObj;
if (hPtr == NULL) {
@@ -1004,7 +1004,7 @@ Tcl_DictObjGet(
}
dict = dictPtr->internalRep.otherValuePtr;
- hPtr = Tcl_FindHashEntry(&dict->table, (char *) keyPtr);
+ hPtr = Tcl_FindHashEntry(&dict->table, keyPtr);
if (hPtr == NULL) {
*valuePtrPtr = NULL;
} else {
@@ -1161,8 +1161,7 @@ Tcl_DictObjFirst(
searchPtr->next = cPtr->nextPtr;
dict->refcount++;
if (keyPtrPtr != NULL) {
- *keyPtrPtr = (Tcl_Obj *) Tcl_GetHashKey(&dict->table,
- &cPtr->entry);
+ *keyPtrPtr = Tcl_GetHashKey(&dict->table, &cPtr->entry);
}
if (valuePtrPtr != NULL) {
*valuePtrPtr = Tcl_GetHashValue(&cPtr->entry);
@@ -1238,7 +1237,7 @@ Tcl_DictObjNext(
searchPtr->next = cPtr->nextPtr;
*donePtr = 0;
if (keyPtrPtr != NULL) {
- *keyPtrPtr = (Tcl_Obj *) Tcl_GetHashKey(
+ *keyPtrPtr = Tcl_GetHashKey(
&((Dict *)searchPtr->dictionaryPtr)->table, &cPtr->entry);
}
if (valuePtrPtr != NULL) {
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 07e62aa..a9d60ff 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEncoding.c,v 1.70 2010/02/24 10:32:17 dkf Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.71 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -776,7 +776,7 @@ Tcl_GetEncoding(
hPtr = Tcl_FindHashEntry(&encodingTable, name);
if (hPtr != NULL) {
- encodingPtr = (Encoding *) Tcl_GetHashValue(hPtr);
+ encodingPtr = Tcl_GetHashValue(hPtr);
encodingPtr->refCount++;
Tcl_MutexUnlock(&encodingMutex);
return (Tcl_Encoding) encodingPtr;
@@ -925,7 +925,7 @@ Tcl_GetEncodingNames(
Encoding *encodingPtr = Tcl_GetHashValue(hPtr);
Tcl_CreateHashEntry(&table,
- (char *) Tcl_NewStringObj(encodingPtr->name, -1), &dummy);
+ Tcl_NewStringObj(encodingPtr->name, -1), &dummy);
}
Tcl_MutexUnlock(&encodingMutex);
@@ -938,7 +938,7 @@ Tcl_GetEncodingNames(
Tcl_DictObjFirst(NULL, map, &mapSearch, &name, NULL, &done);
for (; !done; Tcl_DictObjNext(&mapSearch, &name, NULL, &done)) {
- Tcl_CreateHashEntry(&table, (char *) name, &dummy);
+ Tcl_CreateHashEntry(&table, name, &dummy);
}
/*
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 715c404..4970443 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.491 2010/08/18 22:33:27 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.492 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -233,7 +233,7 @@ VarHashCreateVar(
int *newPtr)
{
Tcl_HashEntry *hPtr = Tcl_CreateHashEntry(&tablePtr->table,
- (char *) key, newPtr);
+ key, newPtr);
if (!hPtr) {
return NULL;
@@ -1655,7 +1655,7 @@ TclCompileObj(
{
Tcl_HashEntry *hePtr =
- Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr);
+ Tcl_FindHashEntry(iPtr->lineBCPtr, codePtr);
if (hePtr) {
ExtCmdLoc *eclPtr = Tcl_GetHashValue(hePtr);
@@ -8221,14 +8221,14 @@ TclGetSrcInfoForPc(
int srcOffset, i;
Interp *iPtr = (Interp *) *codePtr->interpHandle;
Tcl_HashEntry *hePtr =
- Tcl_FindHashEntry(iPtr->lineBCPtr, (char *) codePtr);
+ Tcl_FindHashEntry(iPtr->lineBCPtr, codePtr);
if (!hePtr) {
return;
}
srcOffset = cfPtr->cmd.str.cmd - codePtr->source;
- eclPtr = (ExtCmdLoc *) Tcl_GetHashValue(hePtr);
+ eclPtr = Tcl_GetHashValue(hePtr);
for (i=0; i < eclPtr->nuloc; i++) {
if (eclPtr->loc[i].srcOffset == srcOffset) {
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 2b45169..696b3ac 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOCmd.c,v 1.68 2010/03/20 15:39:46 dkf Exp $
+ * RCS: @(#) $Id: tclIOCmd.c,v 1.69 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -1271,7 +1271,7 @@ RegisterTcpServerInterpCleanup(
TcpAcceptCallbacksDeleteProc, hTblPtr);
}
- hPtr = Tcl_CreateHashEntry(hTblPtr, (char *) acceptCallbackPtr, &isNew);
+ hPtr = Tcl_CreateHashEntry(hTblPtr, acceptCallbackPtr, &isNew);
if (!isNew) {
Tcl_Panic("RegisterTcpServerCleanup: damaged accept record table");
}
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index c9959fc..e22133a 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.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: tclInterp.c,v 1.112 2010/03/05 14:34:04 dkf Exp $
+ * RCS: @(#) $Id: tclInterp.c,v 1.113 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -4008,7 +4008,7 @@ SetScriptLimitCallback(
return;
}
- hashPtr = Tcl_CreateHashEntry(&iPtr->limit.callbacks, (char *) &key,
+ hashPtr = Tcl_CreateHashEntry(&iPtr->limit.callbacks, &key,
&isNew);
if (!isNew) {
limitCBPtr = Tcl_GetHashValue(hashPtr);
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 0d80189..842c421 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclObj.c,v 1.173 2010/04/27 12:36:21 nijtmans Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.174 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -575,7 +575,7 @@ TclContinuationsEnter(
int newEntry;
ThreadSpecificData *tsdPtr = TclGetContLineTable();
Tcl_HashEntry *hPtr =
- Tcl_CreateHashEntry(tsdPtr->lineCLPtr, (char*) objPtr, &newEntry);
+ Tcl_CreateHashEntry(tsdPtr->lineCLPtr, objPtr, &newEntry);
ContLineLoc *clLocPtr = (ContLineLoc *)
ckalloc(sizeof(ContLineLoc) + num*sizeof(int));
@@ -731,7 +731,7 @@ TclContinuationsCopy(
{
ThreadSpecificData *tsdPtr = TclGetContLineTable();
Tcl_HashEntry *hPtr =
- Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) originObjPtr);
+ Tcl_FindHashEntry(tsdPtr->lineCLPtr, originObjPtr);
if (hPtr) {
ContLineLoc *clLocPtr = Tcl_GetHashValue(hPtr);
@@ -765,7 +765,7 @@ TclContinuationsGet(
{
ThreadSpecificData *tsdPtr = TclGetContLineTable();
Tcl_HashEntry *hPtr =
- Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) objPtr);
+ Tcl_FindHashEntry(tsdPtr->lineCLPtr, objPtr);
if (!hPtr) {
return NULL;
@@ -962,7 +962,7 @@ Tcl_GetObjType(
Tcl_MutexLock(&tableMutex);
hPtr = Tcl_FindHashEntry(&typeTable, typeName);
if (hPtr != NULL) {
- typePtr = (const Tcl_ObjType *) Tcl_GetHashValue(hPtr);
+ typePtr = Tcl_GetHashValue(hPtr);
}
Tcl_MutexUnlock(&tableMutex);
return typePtr;
@@ -1111,7 +1111,7 @@ TclDbInitNewObj(
Tcl_InitHashTable(tsdPtr->objThreadMap, TCL_ONE_WORD_KEYS);
}
tablePtr = tsdPtr->objThreadMap;
- hPtr = Tcl_CreateHashEntry(tablePtr, (char *) objPtr, &isNew);
+ hPtr = Tcl_CreateHashEntry(tablePtr, objPtr, &isNew);
if (!isNew) {
Tcl_Panic("expected to create new entry for object map");
}
@@ -1387,7 +1387,7 @@ TclFreeObj(
Tcl_HashEntry *hPtr;
if (tsdPtr->lineCLPtr) {
- hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) objPtr);
+ hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, objPtr);
if (hPtr) {
Tcl_EventuallyFree(Tcl_GetHashValue(hPtr), ContLineLocFree);
Tcl_DeleteHashEntry(hPtr);
@@ -1478,7 +1478,7 @@ TclFreeObj(
Tcl_HashEntry *hPtr;
if (tsdPtr->lineCLPtr) {
- hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, (char *) objPtr);
+ hPtr = Tcl_FindHashEntry(tsdPtr->lineCLPtr, objPtr);
if (hPtr) {
Tcl_EventuallyFree(Tcl_GetHashValue(hPtr), ContLineLocFree);
Tcl_DeleteHashEntry(hPtr);
@@ -3694,7 +3694,7 @@ Tcl_DbIncrRefCount(
if (!tablePtr) {
Tcl_Panic("object table not initialized");
}
- hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
+ hPtr = Tcl_FindHashEntry(tablePtr, objPtr);
if (!hPtr) {
Tcl_Panic("%s%s",
"Trying to incr ref count of "
@@ -3759,7 +3759,7 @@ Tcl_DbDecrRefCount(
if (!tablePtr) {
Tcl_Panic("object table not initialized");
}
- hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
+ hPtr = Tcl_FindHashEntry(tablePtr, objPtr);
if (!hPtr) {
Tcl_Panic("%s%s",
"Trying to decr ref count of "
@@ -3838,7 +3838,7 @@ Tcl_DbIsShared(
if (!tablePtr) {
Tcl_Panic("object table not initialized");
}
- hPtr = Tcl_FindHashEntry(tablePtr, (char *) objPtr);
+ hPtr = Tcl_FindHashEntry(tablePtr, objPtr);
if (!hPtr) {
Tcl_Panic("%s%s",
"Trying to check shared status of"
diff --git a/generic/tclProc.c b/generic/tclProc.c
index 64d3f13..d1a90ad 100644
--- a/generic/tclProc.c
+++ b/generic/tclProc.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclProc.c,v 1.180 2010/08/15 16:12:27 dkf Exp $
+ * RCS: @(#) $Id: tclProc.c,v 1.181 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -272,7 +272,7 @@ Tcl_ProcObjCmd(
cfPtr->cmd.str.len = 0;
hePtr = Tcl_CreateHashEntry(iPtr->linePBodyPtr,
- (char *) procPtr, &isNew);
+ procPtr, &isNew);
if (!isNew) {
/*
* Get the old command frame and release it. See also
@@ -2568,7 +2568,7 @@ SetLambdaFromAny(
cfPtr->cmd.str.len = 0;
Tcl_SetHashValue(Tcl_CreateHashEntry(iPtr->linePBodyPtr,
- (char *) procPtr, &isNew), cfPtr);
+ procPtr, &isNew), cfPtr);
}
/*
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 5c7dfbf..036a50c 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTest.c,v 1.152 2010/07/24 06:39:52 nijtmans Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.153 2010/08/22 18:53:26 nijtmans Exp $
*/
#undef STATIC_BUILD
@@ -6539,7 +6539,7 @@ TestHashSystemHashCmd(
}
for (i=0 ; i<limit ; i++) {
- hPtr = Tcl_CreateHashEntry(&hash, (char *) INT2PTR(i), &isNew);
+ hPtr = Tcl_CreateHashEntry(&hash, INT2PTR(i), &isNew);
if (!isNew) {
Tcl_SetObjResult(interp, Tcl_NewIntObj(i));
Tcl_AppendToObj(Tcl_GetObjResult(interp)," creation problem",-1);
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index d3a6093..2e8759e 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclTrace.c,v 1.59 2010/08/19 10:07:43 dkf Exp $
+ * RCS: @(#) $Id: tclTrace.c,v 1.60 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -3198,7 +3198,7 @@ TraceVarEx(
#endif
tracePtr->flags = tracePtr->flags & flagMask;
- hPtr = Tcl_CreateHashEntry(&iPtr->varTraces, (char *) varPtr, &isNew);
+ hPtr = Tcl_CreateHashEntry(&iPtr->varTraces, varPtr, &isNew);
if (isNew) {
tracePtr->nextPtr = NULL;
} else {
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 723308a..fb4e20b 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUtil.c,v 1.116 2010/08/10 20:48:52 hobbs Exp $
+ * RCS: @(#) $Id: tclUtil.c,v 1.117 2010/08/22 18:53:26 nijtmans Exp $
*/
#include "tclInt.h"
@@ -3009,7 +3009,7 @@ TclSetProcessGlobalValue(
cacheMap = GetThreadHash(&pgvPtr->key);
ClearHash(cacheMap);
hPtr = Tcl_CreateHashEntry(cacheMap,
- (char *) INT2PTR(pgvPtr->epoch), &dummy);
+ INT2PTR(pgvPtr->epoch), &dummy);
Tcl_SetHashValue(hPtr, newValue);
Tcl_MutexUnlock(&pgvPtr->mutex);
}
@@ -3104,7 +3104,7 @@ TclGetProcessGlobalValue(
value = Tcl_NewStringObj(pgvPtr->value, pgvPtr->numBytes);
hPtr = Tcl_CreateHashEntry(cacheMap,
- (char *) INT2PTR(pgvPtr->epoch), &dummy);
+ INT2PTR(pgvPtr->epoch), &dummy);
Tcl_MutexUnlock(&pgvPtr->mutex);
Tcl_SetHashValue(hPtr, value);
Tcl_IncrRefCount(value);
diff --git a/generic/tclVar.c b/generic/tclVar.c
index e3a5a32..c35685b 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclVar.c,v 1.201 2010/08/02 11:08:28 msofer Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.202 2010/08/22 18:53:25 nijtmans Exp $
*/
#include "tclInt.h"
@@ -55,7 +55,7 @@ VarHashCreateVar(
int *newPtr)
{
Tcl_HashEntry *hPtr = Tcl_CreateHashEntry(&tablePtr->table,
- (char *) key, newPtr);
+ key, newPtr);
if (hPtr) {
return VarHashGetValue(hPtr);
@@ -2455,13 +2455,13 @@ UnsetVarStruct(
int isNew;
- tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) varPtr);
+ tPtr = Tcl_FindHashEntry(&iPtr->varTraces, varPtr);
tracePtr = Tcl_GetHashValue(tPtr);
varPtr->flags &= ~VAR_ALL_TRACES;
Tcl_DeleteHashEntry(tPtr);
if (dummyVar.flags & VAR_TRACED_UNSET) {
tPtr = Tcl_CreateHashEntry(&iPtr->varTraces,
- (char *) &dummyVar, &isNew);
+ &dummyVar, &isNew);
Tcl_SetHashValue(tPtr, tracePtr);
}
}
@@ -2481,8 +2481,7 @@ UnsetVarStruct(
tracePtr = NULL;
if (TclIsVarTraced(&dummyVar)) {
- tPtr = Tcl_FindHashEntry(&iPtr->varTraces,
- (char *) &dummyVar);
+ tPtr = Tcl_FindHashEntry(&iPtr->varTraces, &dummyVar);
tracePtr = Tcl_GetHashValue(tPtr);
if (tPtr) {
Tcl_DeleteHashEntry(tPtr);
@@ -3076,7 +3075,7 @@ ArrayStartSearchCmd(
*/
searchPtr = (ArraySearch *) ckalloc(sizeof(ArraySearch));
- hPtr = Tcl_CreateHashEntry(&iPtr->varSearches, (char *) varPtr, &isNew);
+ hPtr = Tcl_CreateHashEntry(&iPtr->varSearches, varPtr, &isNew);
if (isNew) {
searchPtr->id = 1;
Tcl_AppendResult(interp, "s-1-", varName, NULL);
@@ -3401,7 +3400,7 @@ ArrayDoneSearchCmd(
* variable.
*/
- hPtr = Tcl_FindHashEntry(&iPtr->varSearches, (char *) varPtr);
+ hPtr = Tcl_FindHashEntry(&iPtr->varSearches, varPtr);
if (searchPtr == Tcl_GetHashValue(hPtr)) {
if (searchPtr->nextPtr) {
Tcl_SetHashValue(hPtr, searchPtr->nextPtr);
@@ -5148,7 +5147,7 @@ ParseSearchId(
if (varPtr->flags & VAR_SEARCH_ACTIVE) {
Tcl_HashEntry *hPtr =
- Tcl_FindHashEntry(&iPtr->varSearches, (char *) varPtr);
+ Tcl_FindHashEntry(&iPtr->varSearches, varPtr);
for (searchPtr = Tcl_GetHashValue(hPtr); searchPtr != NULL;
searchPtr = searchPtr->nextPtr) {
@@ -5190,7 +5189,7 @@ DeleteSearches(
Tcl_HashEntry *sPtr;
if (arrayVarPtr->flags & VAR_SEARCH_ACTIVE) {
- sPtr = Tcl_FindHashEntry(&iPtr->varSearches, (char *) arrayVarPtr);
+ sPtr = Tcl_FindHashEntry(&iPtr->varSearches, arrayVarPtr);
for (searchPtr = Tcl_GetHashValue(sPtr); searchPtr != NULL;
searchPtr = nextPtr) {
nextPtr = searchPtr->nextPtr;
@@ -5258,8 +5257,7 @@ TclDeleteNamespaceVars(
*/
if (TclIsVarTraced(varPtr)) {
- Tcl_HashEntry *tPtr = Tcl_FindHashEntry(&iPtr->varTraces,
- (char *) varPtr);
+ Tcl_HashEntry *tPtr = Tcl_FindHashEntry(&iPtr->varTraces, varPtr);
VarTrace *tracePtr = Tcl_GetHashValue(tPtr);
ActiveVarTrace *activePtr;
@@ -5448,7 +5446,7 @@ DeleteArray(
TclObjCallVarTraces(iPtr, NULL, elPtr, arrayNamePtr,
elNamePtr, flags,/* leaveErrMsg */ 0, index);
}
- tPtr = Tcl_FindHashEntry(&iPtr->varTraces, (char *) elPtr);
+ tPtr = Tcl_FindHashEntry(&iPtr->varTraces, elPtr);
tracePtr = Tcl_GetHashValue(tPtr);
while (tracePtr) {
VarTrace *prevPtr = tracePtr;