source:
issm/oecreview/Archive/14312-15392/ISSM-15106-15107.diff
Last change on this file was 15393, checked in by , 12 years ago | |
---|---|
File size: 1.5 KB |
-
../trunk-jpl/src/wrappers/python/include/wrapper_macros.h
42 42 #if _PYTHON_MAJOR_ >=3 43 43 /* WRAPPER 3.2 {{{*/ 44 44 #define WRAPPER(modulename,...) \ 45 45 \ 46 46 static PyObject* modulename(PyObject* self,PyObject* args);\ 47 47 static PyMethodDef modulename##_funcs[] = {\ 48 48 {#modulename, (PyCFunction)modulename, METH_VARARGS, ""},\ 49 49 {NULL,NULL,0,NULL}\ 50 50 };\ 51 51 \ 52 52 static struct PyModuleDef modulename##module= {\ 53 53 PyModuleDef_HEAD_INIT,\ 54 54 #modulename, /* name of module */\ … … 57 57 or -1 if the module keeps state in global variables. */\ 58 58 modulename##_funcs\ 59 59 };\ 60 60 \ 61 61 PyMODINIT_FUNC PyInit_##modulename(void){\ 62 62 \ 63 63 import_array();\ 64 64 return PyModule_Create(&modulename##module);\ 65 65 }\ 66 66 \ 67 67 static PyObject* modulename(PyObject* self,PyObject* args) 68 68 /*}}}*/ 69 69 #else 70 70 /* WRAPPER 2.7 {{{*/ 71 71 #define WRAPPER(modulename,...) \ 72 72 \ 73 73 static PyObject* modulename(PyObject* self,PyObject* args);\ 74 74 static PyMethodDef modulename##_funcs[] = {\ 75 75 {#modulename, (PyCFunction)modulename, METH_VARARGS, ""},\ 76 76 {NULL,NULL,0,NULL}\ 77 77 };\ 78 78 \ 79 79 PyMODINIT_FUNC init##modulename(void){\ 80 80 \ 81 81 import_array();\ 82 82 (void) Py_InitModule(#modulename, modulename##_funcs);\ 83 83 }\ 84 84 \ 85 85 static PyObject* modulename(PyObject* self,PyObject* args) 86 86 /*}}}*/ 87 87 #endif
Note:
See TracBrowser
for help on using the repository browser.