Merge pull request #3300 from davidhewitt/enter-recursive-call

fix FFI definition `Py_EnterRecursiveCall`
This commit is contained in:
messense 2023-07-06 01:43:18 +00:00 committed by GitHub
commit 26018560f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -0,0 +1 @@
Correct FFI definition `Py_EnterRecursiveCall` to return `c_int` (was incorrectly returning `()`).

View file

@ -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();