pub unsafe fn ptr_len(ptr: i32) -> i32
This function is unsafe because it dereferences the pointer. There is no way to make this function unsafe.