mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Move the extension test to examples
This commit is contained in:
15
test/examples/init_extension_module/module.c
Normal file
15
test/examples/init_extension_module/module.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "Python.h"
|
||||
|
||||
static struct PyModuleDef module = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"init_extension_module",
|
||||
NULL,
|
||||
-1,
|
||||
NULL
|
||||
};
|
||||
|
||||
PyMODINIT_FUNC PyInit_init_extension_module(void){
|
||||
PyObject *m = PyModule_Create(&module);
|
||||
PyModule_AddObject(m, "foo", Py_None);
|
||||
return m;
|
||||
}
|
||||
Reference in New Issue
Block a user