diff options
author | nijtmans <nijtmans> | 2010-11-29 09:07:12 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-11-29 09:07:12 (GMT) |
commit | 8ccebbf9fc50bab1c1a3fa148f9632f059296bd2 (patch) | |
tree | f4a05b05f4420db2757c9b6934a169d18c4d0bf0 /generic/tkAtom.c | |
parent | 13fd371fb175d2dc12a9ec83a2cd45f540086857 (diff) | |
download | tk-8ccebbf9fc50bab1c1a3fa148f9632f059296bd2.zip tk-8ccebbf9fc50bab1c1a3fa148f9632f059296bd2.tar.gz tk-8ccebbf9fc50bab1c1a3fa148f9632f059296bd2.tar.bz2 |
Fix various 64-bit gcc(-4.5.2) warnings: cast from pointer to integer of different size
Diffstat (limited to 'generic/tkAtom.c')
-rw-r--r-- | generic/tkAtom.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tkAtom.c b/generic/tkAtom.c index 57e6923..43995e6 100644 --- a/generic/tkAtom.c +++ b/generic/tkAtom.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: tkAtom.c,v 1.12 2010/01/02 22:52:38 dkf Exp $ + * RCS: @(#) $Id: tkAtom.c,v 1.13 2010/11/29 09:07:13 nijtmans Exp $ */ #include "tkInt.h" @@ -95,11 +95,11 @@ Tk_InternAtom( Atom atom; atom = XInternAtom(dispPtr->display, name, False); - Tcl_SetHashValue(hPtr, atom); - hPtr2 = Tcl_CreateHashEntry(&dispPtr->atomTable, (char*) atom, &isNew); + Tcl_SetHashValue(hPtr, INT2PTR(atom)); + hPtr2 = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew); Tcl_SetHashValue(hPtr2, Tcl_GetHashKey(&dispPtr->nameTable, hPtr)); } - return (Atom) Tcl_GetHashValue(hPtr); + return (Atom)PTR2INT(Tcl_GetHashValue(hPtr)); } /* @@ -137,7 +137,7 @@ Tk_GetAtomName( AtomInit(dispPtr); } - hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, (char *) atom); + hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, INT2PTR(atom)); if (hPtr == NULL) { const char *name; Tk_ErrorHandler handler; @@ -152,12 +152,12 @@ Tk_GetAtomName( } Tk_DeleteErrorHandler(handler); hPtr = Tcl_CreateHashEntry(&dispPtr->nameTable, name, &isNew); - Tcl_SetHashValue(hPtr, atom); + Tcl_SetHashValue(hPtr, INT2PTR(atom)); if (mustFree) { XFree(mustFree); } name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr); - hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, (char *) atom, &isNew); + hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew); Tcl_SetHashValue(hPtr, name); } return Tcl_GetHashValue(hPtr); @@ -194,16 +194,16 @@ AtomInit( const char *name; int isNew; - hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, (char *) atom); + hPtr = Tcl_FindHashEntry(&dispPtr->atomTable, INT2PTR(atom)); if (hPtr != NULL) { continue; } name = atomNameArray[atom - 1]; hPtr = Tcl_CreateHashEntry(&dispPtr->nameTable, name, &isNew); - Tcl_SetHashValue(hPtr, atom); + Tcl_SetHashValue(hPtr, INT2PTR(atom)); name = Tcl_GetHashKey(&dispPtr->nameTable, hPtr); - hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, (char *) atom, &isNew); + hPtr = Tcl_CreateHashEntry(&dispPtr->atomTable, INT2PTR(atom), &isNew); Tcl_SetHashValue(hPtr, name); } } |