intptr_t instead of int

Used stdint.h for supporting 64 bit architecture by using intptr_t for saving pointers.