Add unsafe_*_of_ptr functions