Debian Codegraph @

test cases/python/12 rust extmodule/ext/tachyon_module.rs

raw
1 #![allow(improper_ctypes)]
2
3 #[repr(C)]
4 pub struct PyModuleDef;
5 #[repr(C)]
6 pub struct PyObject;
7
8 extern "C" {
9 pub static mut tachyonmodule: *mut PyModuleDef;
10 pub fn PyModule_Create2(def: *mut PyModuleDef, abiver: i32) -> *mut PyObject;
11 }
12
13 #[allow(non_snake_case)]
14 #[no_mangle]
15 pub unsafe extern "C" fn PyInit_tachyon() -> *mut PyObject {
16 PyModule_Create2(tachyonmodule, 3)
17 }