diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclBasic.c | 2 | ||||
-rw-r--r-- | generic/tclBinary.c | 2 | ||||
-rw-r--r-- | generic/tclHash.c | 4 | ||||
-rw-r--r-- | generic/tclTest.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 764e0d9..954b2b3 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -6750,7 +6750,7 @@ ExprRandFunc( * to insure different seeds in different threads (bug #416643) */ - iPtr->randSeed = TclpGetClicks() + ((long)Tcl_GetCurrentThread()<<12); + iPtr->randSeed = TclpGetClicks() + (PTR2INT(Tcl_GetCurrentThread())<<12); /* * Make sure 1 <= randSeed <= (2^31) - 2. See below. diff --git a/generic/tclBinary.c b/generic/tclBinary.c index 90d392b..f321b28 100644 --- a/generic/tclBinary.c +++ b/generic/tclBinary.c @@ -1907,7 +1907,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_Obj *) Tcl_GetHashValue(hPtr); } diff --git a/generic/tclHash.c b/generic/tclHash.c index 00bfdf0..256b073 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.c @@ -434,7 +434,7 @@ Tcl_DeleteHashEntry( #if TCL_HASH_KEY_STORE_HASH if (typePtr->hashKeyProc == NULL || typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { - index = RANDOM_INDEX (tablePtr, entryPtr->hash); + index = RANDOM_INDEX(tablePtr, PTR2UINT(entryPtr->hash)); } else { index = PTR2UINT(entryPtr->hash) & tablePtr->mask; } @@ -1064,7 +1064,7 @@ RebuildTable( #if TCL_HASH_KEY_STORE_HASH if (typePtr->hashKeyProc == NULL || typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { - index = RANDOM_INDEX (tablePtr, hPtr->hash); + index = RANDOM_INDEX (tablePtr, PTR2UINT(hPtr->hash)); } else { index = PTR2UINT(hPtr->hash) & tablePtr->mask; } diff --git a/generic/tclTest.c b/generic/tclTest.c index 130bc38..e0a4ef5 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -5315,7 +5315,7 @@ TestmainthreadCmd( const char **argv) /* Argument strings. */ { if (argc == 1) { - Tcl_Obj *idObj = Tcl_NewLongObj((long)Tcl_GetCurrentThread()); + Tcl_Obj *idObj = Tcl_NewLongObj((long)(intptr_t)Tcl_GetCurrentThread()); Tcl_SetObjResult(interp, idObj); return TCL_OK; } else { @@ -6014,7 +6014,7 @@ TestChannelCmd( return TCL_ERROR; } - TclFormatInt(buf, (long) Tcl_GetChannelThread(chan)); + TclFormatInt(buf, (long)(intptr_t)Tcl_GetChannelThread(chan)); Tcl_AppendResult(interp, buf, NULL); return TCL_OK; } |