Skip to content

clean up / fix outdated private API definitions#6038

Open
davidhewitt wants to merge 3 commits into
PyO3:mainfrom
davidhewitt:dh/fix-more-ffi
Open

clean up / fix outdated private API definitions#6038
davidhewitt wants to merge 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.

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.

1 participant