Add support for PyFrozenDict#6174
Conversation
5085711 to
4e658b3
Compare
ee55a45 to
fd12ac9
Compare
|
I am a bit at a loss when it comes to the ffi checks. Pointers welcome |
|
AFAIK the header that contains this in CPython is (Not opining on any part of this patch.) |
|
Thanks I will try that. |
|
So the ffi-check situtation is a bit more complex since accessing the core headers requires Py_BUILD_CORE define. Is this something pyo3 maintainers would be willing to accept ? |
Icxolu
left a comment
There was a problem hiding this comment.
I'm also not an expert on the FFI layer, but here are some comment from my side.
(I haven't looked at the wrapping code, as we first need to get the FFI bindings correct.)
| #[cfg(Py_3_15)] | ||
| #[cfg(not(GraalPy))] | ||
| opaque_struct!(pub PyFrozenDictObject); |
There was a problem hiding this comment.
This is not defined in cpython/dictobject.h, so we should not add it here. I also don't see that we need this for anything, so I would suggest to just drop it entirely for now, which also removes the need to include internal headers in the ffi check.
| #[cfg(Py_3_15)] | ||
| #[cfg(not(RustPython))] | ||
| extern_libpython! { | ||
| pub static mut PyFrozenDict_Type: PyTypeObject; |
There was a problem hiding this comment.
This and all the following are defined in cpython/dictobject.h, so they need to be moved to cpython/dictobject.rs here as well.
We should not be using any symbols from |
No description provided.