fix void * _hash_ptr and add a test for it