-
Notifications
You must be signed in to change notification settings - Fork 827
add Py_HashBuffer
to pyo3-ffi
#5086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a774622
to
f3d3160
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine, we'll be adding 3.14 support very soon 👍
pyo3-ffi/src/pyhash.rs
Outdated
|
||
#[cfg(Py_3_14)] | ||
pub fn Py_HashBuffer(ptr: *const c_void, len: Py_ssize_t) -> Py_hash_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this should be located in src/cpython/pyhash.rs
(that file may need updating); maybe please sync this file with 3.13 locations while you're at it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, I picked the wrong pyhash file. Will do an update as well!
ddc93f9
to
cf03378
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Py_HashPointer
and PyObject_GenericHash
need to be mentioned in the changelog, otherwise LGTM 👍
I think the ci does not like adding python 3.14 functions. @davidhewitt should we wait for full 3.14 support? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's just the PyPy failure which is a problem.
use std::os::raw::{c_char, c_int, c_void}; | ||
|
||
#[repr(C)] | ||
#[derive(Copy, Clone)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[derive(Copy, Clone)] | |
#[derive(Copy, Clone)] | |
#[cfg(not(any(PyPy, GraalPy)))]` |
... and similar for PyHash_GetFuncDef
, perhaps.
77b7b31
to
dc4a817
Compare
It is maybe too early to add support for python 3.14 function, but this paves the way to remove the private
_Py_HashBytes
.ref pythoncapi-compat