Skip to content

Commit

Permalink
Merge pull request #3300 from davidhewitt/enter-recursive-call
Browse files Browse the repository at this point in the history
fix FFI definition `Py_EnterRecursiveCall`
  • Loading branch information
messense committed Jul 6, 2023
2 parents 8fcf444 + f7f3ff8 commit 2601856
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions newsfragments/3300.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Correct FFI definition `Py_EnterRecursiveCall` to return `c_int` (was incorrectly returning `()`).
2 changes: 1 addition & 1 deletion pyo3-ffi/src/ceval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ extern "C" {
extern "C" {
#[cfg(Py_3_9)]
#[cfg_attr(PyPy, link_name = "PyPy_EnterRecursiveCall")]
pub fn Py_EnterRecursiveCall(arg1: *const c_char);
pub fn Py_EnterRecursiveCall(arg1: *const c_char) -> c_int;
#[cfg(Py_3_9)]
#[cfg_attr(PyPy, link_name = "PyPy_LeaveRecursiveCall")]
pub fn Py_LeaveRecursiveCall();
Expand Down

0 comments on commit 2601856

Please sign in to comment.