py3: add PyMOD_INIT_FUNC
from: py3: ported module init to python3, wwmayer
This commit is contained in:
@@ -84,6 +84,21 @@
|
||||
*/
|
||||
#define PYFUNCIMP_S(CLASS,SFUNC) PyObject* CLASS::SFUNC (PyObject *self,PyObject *args,PyObject *kwd)
|
||||
|
||||
|
||||
/** Macro for initialization function of Python modules.
|
||||
*/
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
# define PyMOD_INIT_FUNC(name) PyMODINIT_FUNC PyInit_##name(void)
|
||||
#else
|
||||
# define PyMOD_INIT_FUNC(name) PyMODINIT_FUNC init##name(void)
|
||||
#endif
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
# define PyMOD_Return(name) return name
|
||||
#else
|
||||
# define PyMOD_Return(name) return
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Union to convert from PyTypeObject to PyObject pointer.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user