pyo3_ffi/compat/
py_3_9.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
compat_function!(
    originally_defined_for(all(
        not(PyPy),
        not(GraalPy),
        any(Py_3_10, all(not(Py_LIMITED_API), Py_3_9)) // Added to python in 3.9 but to limited API in 3.10
    ));

    #[inline]
    pub unsafe fn PyObject_CallNoArgs(obj: *mut crate::PyObject) -> *mut crate::PyObject {
        crate::PyObject_CallObject(obj, std::ptr::null_mut())
    }
);

compat_function!(
    originally_defined_for(all(Py_3_9, not(any(Py_LIMITED_API, PyPy, GraalPy))));

    #[inline]
    pub unsafe fn PyObject_CallMethodNoArgs(obj: *mut crate::PyObject, name: *mut crate::PyObject) -> *mut crate::PyObject {
        crate::PyObject_CallMethodObjArgs(obj, name, std::ptr::null_mut::<crate::PyObject>())
    }
);
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here