4 static PyMethodDef TestextMethods[] = {
9 #if PY_MAJOR_VERSION >=3
10 static struct PyModuleDef testextmodule = {
11 PyModuleDef_HEAD_INIT, /* This should correspond to a PyModuleDef_Base type */
12 "testext", /* This is the module name */
13 "Test extension module", /* This is the module docstring */
14 -1, /* This defines the size of the module and says everything is global */
15 TestextMethods /* This is the method definition */
21 return PyModule_Create(&testextmodule);
27 Py_InitModule("testext", TestextMethods);