mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
libc::c_void -> std::ffi::c_void
This commit is contained in:
@@ -194,7 +194,7 @@ pub fn lcg_urandom(mut x: u32, buf: &mut [u8]) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn hash_pointer_raw(p: *const libc::c_void) -> PyHash {
|
||||
pub fn hash_pointer_raw(p: *const std::ffi::c_void) -> PyHash {
|
||||
// TODO: Use commented logic when below issue resolved.
|
||||
// Ref: https://github.com/RustPython/RustPython/pull/3951#issuecomment-1193108966
|
||||
|
||||
@@ -206,6 +206,6 @@ pub fn hash_pointer_raw(p: *const libc::c_void) -> PyHash {
|
||||
p as PyHash
|
||||
}
|
||||
|
||||
pub fn hash_pointer(p: *const libc::c_void) -> PyHash {
|
||||
pub fn hash_pointer(p: *const std::ffi::c_void) -> PyHash {
|
||||
fix_sentinel(hash_pointer_raw(p))
|
||||
}
|
||||
|
||||
@@ -541,7 +541,7 @@ impl Hashable for PyFloat {
|
||||
fn hash(zelf: &crate::Py<Self>, _vm: &VirtualMachine) -> PyResult<hash::PyHash> {
|
||||
match hash::hash_float(zelf.to_f64()) {
|
||||
Some(value) => Ok(value),
|
||||
None => Ok(hash::hash_pointer(zelf as *const _ as *const libc::c_void)),
|
||||
None => Ok(hash::hash_pointer(zelf as *const _ as *const std::ffi::c_void)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user