Skip to content

Commit 8a97c0b

Browse files
committed
libc::c_void -> std::ffi::c_void
1 parent 98d3f38 commit 8a97c0b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

common/src/hash.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub fn lcg_urandom(mut x: u32, buf: &mut [u8]) {
194194
}
195195
}
196196

197-
pub fn hash_pointer_raw(p: *const libc::c_void) -> PyHash {
197+
pub fn hash_pointer_raw(p: *const std::ffi::c_void) -> PyHash {
198198
// TODO: Use commented logic when below issue resolved.
199199
// Ref: https://github.com/RustPython/RustPython/pull/3951#issuecomment-1193108966
200200

@@ -206,6 +206,6 @@ pub fn hash_pointer_raw(p: *const libc::c_void) -> PyHash {
206206
p as PyHash
207207
}
208208

209-
pub fn hash_pointer(p: *const libc::c_void) -> PyHash {
209+
pub fn hash_pointer(p: *const std::ffi::c_void) -> PyHash {
210210
fix_sentinel(hash_pointer_raw(p))
211211
}

vm/src/builtins/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ impl Hashable for PyFloat {
541541
fn hash(zelf: &crate::Py<Self>, _vm: &VirtualMachine) -> PyResult<hash::PyHash> {
542542
match hash::hash_float(zelf.to_f64()) {
543543
Some(value) => Ok(value),
544-
None => Ok(hash::hash_pointer(zelf as *const _ as *const libc::c_void)),
544+
None => Ok(hash::hash_pointer(zelf as *const _ as *const std::ffi::c_void)),
545545
}
546546
}
547547
}

0 commit comments

Comments
 (0)