Skip to content
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

Add FFI definitions for Py_EnterRecursiveCall and Py_LeaveRecursiveCall #2511

Merged
merged 2 commits into from Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Supprt `#[pyo3(name)]` on enum variants [#2457](https://github.com/PyO3/pyo3/pull/2457)
- Add `PySuper` object [#2049](https://github.com/PyO3/pyo3/issues/2049)
- Add support for generating PyPy Windows import library. [#2506](https://github.com/PyO3/pyo3/pull/2506)
- Add FFI definitions for `Py_EnterRecursiveCall` and `Py_LeaveRecursiveCall`. [#2511](https://github.com/PyO3/pyo3/pull/2511)

### Changed

Expand Down
10 changes: 8 additions & 2 deletions pyo3-ffi/src/ceval.rs
Expand Up @@ -73,8 +73,14 @@ extern "C" {
fn _Py_CheckRecursiveCall(_where: *mut c_char) -> c_int;
}

// skipped Py_EnterRecursiveCall
// skipped Py_LeaveRecursiveCall
extern "C" {
#[cfg(Py_3_9)]
#[cfg_attr(PyPy, link_name = "PyPy_EnterRecursiveCall")]
pub fn Py_EnterRecursiveCall(arg1: *const c_char);
#[cfg(Py_3_9)]
#[cfg_attr(PyPy, link_name = "PyPy_LeaveRecursiveCall")]
pub fn Py_LeaveRecursiveCall();
}

extern "C" {
pub fn PyEval_GetFuncName(arg1: *mut PyObject) -> *const c_char;
Expand Down