Skip to content

Commit

Permalink
Add FFI definitions for Py_EnterRecursiveCall and
Browse files Browse the repository at this point in the history
`Py_LeaveRecursiveCall`
  • Loading branch information
messense committed Jul 15, 2022
1 parent 5a1be18 commit a2ec381
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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
8 changes: 6 additions & 2 deletions pyo3-ffi/src/ceval.rs
Expand Up @@ -73,8 +73,12 @@ extern "C" {
fn _Py_CheckRecursiveCall(_where: *mut c_char) -> c_int;
}

// skipped Py_EnterRecursiveCall
// skipped Py_LeaveRecursiveCall
extern "C" {
#[cfg(any(Py_3_9, not(Py_LIMITED_API)))]
pub fn Py_EnterRecursiveCall(arg1: *const c_char);
#[cfg(any(Py_3_9, not(Py_LIMITED_API)))]
pub fn Py_LeaveRecursiveCall();
}

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

0 comments on commit a2ec381

Please sign in to comment.