SILC_PTR_TO_32

NAME

    #define SILC_PTR_TO_32(ptr)

DESCRIPTION

Type casts a pointer's value into a 32-bit integer. Use this to avoid compiler warnings when type casting pointers to integers of different size.

SOURCE

#if SILC_SIZEOF_VOID_P < 8
#define SILC_PTR_TO_32(_ptr__) ((SilcUInt32)(_ptr__))
#else
#define SILC_PTR_TO_32(_ptr__)                                          \
  ((SilcUInt32)((SilcUInt64)(_ptr__) & (SilcUInt32)0xFFFFFFFFUL))
#endif