Skip to content

Commit 595be1a

Browse files
Add Py_HashBuffer binding when 3.14+
1 parent d5589fe commit 595be1a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pyo3-ffi/src/pyhash.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ extern "C" {
1414

1515
#[cfg(not(any(Py_LIMITED_API, PyPy)))]
1616
pub fn _Py_HashBytes(src: *const c_void, len: Py_ssize_t) -> Py_hash_t;
17+
18+
#[cfg(Py_3_14)]
19+
pub fn Py_HashBuffer(ptr: *const c_void, len: Py_ssize_t) -> Py_hash_t;
1720
}
1821

1922
pub const _PyHASH_MULTIPLIER: c_ulong = 1000003;

0 commit comments

Comments
 (0)