/* * Macros used to cast between pointers and integers (e.g. when storing an int * in ClientData), on 64-bit architectures they avoid gcc warning about "cast * to/from pointer from/to integer of different size". */ #if !defined(INT2PTR) # define INT2PTR(p) ((void *)(ptrdiff_t)(p)) #endif #if !defined(PTR2INT) # define PTR2INT(p) ((ptrdiff_t)(p)) #endif #if !defined(UINT2PTR) # define UINT2PTR(p) ((void *)(size_t)(p)) #endif #if !defined(PTR2UINT) # define PTR2UINT(p) ((size_t)(p)) #endif