Add new dictionary functions and extern declarations#5947
Add new dictionary functions and extern declarations#5947
Conversation
Added new functions for dictionary operations and updated extern declarations.
Conditionally include c_char and c_int based on Python version.
| _tmpkeys: *mut PyObject, | ||
| } | ||
|
|
||
| extern_libpython! { |
There was a problem hiding this comment.
sorry, forgot to talk about about pypy and graalpy. Have you checked if these functions are defined there?
There was a problem hiding this comment.
I don't use either PyPy or GraalPy, so I can't tell you if these functions are used by either
There was a problem hiding this comment.
Please place these functions in the correct locations in the file (makes it easier to compare against upstream in the future).
|
@Tpt and @davidhewitt, mind reviewing this and #5949 again? |
pyo3-ffi/src/dictobject.rs
Outdated
|
|
||
| extern_libpython! { | ||
| #[cfg(all(Py_3_15, not(Py_LIMITED_API)))] | ||
| pub fn PyDict_SetDefaultRef( |
There was a problem hiding this comment.
Please place this in the position which matches the 3.15 headers (i.e. after PyDict_GetItemStringRef).
| _tmpkeys: *mut PyObject, | ||
| } | ||
|
|
||
| extern_libpython! { |
There was a problem hiding this comment.
Please place these functions in the correct locations in the file (makes it easier to compare against upstream in the future).
Removed PyObject_GenericGetDict function declaration for non-limited API.
Removed unused import of c_void for non-limited API.
Comment out the PyDict_SetDefaultRef function definition for specific Python versions.
Added new functions for dictionary operations and updated extern declarations.