Skip to content

clean up / fix outdated private API definitions#6038

Merged
ngoldbaum merged 3 commits into
PyO3:mainfrom
davidhewitt:dh/fix-more-ffi
May 25, 2026
Merged

clean up / fix outdated private API definitions#6038
ngoldbaum merged 3 commits into
PyO3:mainfrom
davidhewitt:dh/fix-more-ffi

Conversation

@davidhewitt
Copy link
Copy Markdown
Member

Related to #5965 / #6036

This PR cleans up another batch of private FFI functions which had fallen out of date in pyo3-ffi.

@davidhewitt davidhewitt mentioned this pull request May 12, 2026
Comment on lines +144 to +152
#[cfg_attr(not(Py_3_12), link_name = "_PyCode_GetExtra")]
pub fn PyUnstable_Code_GetExtra(
code: *mut PyObject,
index: Py_ssize_t,
extra: *mut *mut c_void,
) -> c_int;

#[cfg_attr(not(Py_3_12), link_name = "_PyCode_SetExtra")]
pub fn PyUnstable_Code_SetExtra(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't decide exactly the strategy to handle these renames; keeping the old name around as a deprecated symbol and exposing the new one on all versions seemed like the easiest way to give users a migration path.

Copy link
Copy Markdown
Contributor

@ngoldbaum ngoldbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I double-checked all the FFI changes and didn't see any issues.

@ngoldbaum ngoldbaum added this pull request to the merge queue May 25, 2026
Merged via the queue into PyO3:main with commit 08dde9f May 25, 2026
47 of 48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants