Unit tests on 32-bit architectures were failing due to "cast to pointer from integer of different size" warnings. mock_ptr_type silences those by first casting to uintptr_t.
issue #829