Skip to content

Commit

Permalink
Add FFI definition for PyModule_AddType
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Mar 26, 2022
1 parent c3cabed commit 70ad4cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyo3-ffi/src/modsupport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@ extern "C" {
name: *const c_char,
value: *const c_char,
) -> c_int;
// skipped non-limited / 3.9 PyModule_AddType
#[cfg(any(Py_3_10, all(Py_3_9, not(Py_LIMITED_API))))]
#[cfg_attr(PyPy, link_name = "PyPyModule_AddType")]
pub fn PyModule_AddType(
module: *mut PyObject,
type_: *mut crate::object::PyTypeObject,
) -> c_int;
// skipped PyModule_AddIntMacro
// skipped PyModule_AddStringMacro
pub fn PyModule_SetDocString(arg1: *mut PyObject, arg2: *const c_char) -> c_int;
Expand Down

0 comments on commit 70ad4cd

Please sign in to comment.