#116 cast using (intptr_t) to avoid warning 'cast from pointer to integer of different size'