Fix mod JtReader with python3

This commit is contained in:
Fabio Rossi
2018-07-06 19:18:45 +02:00
committed by Yorik van Havre
parent 41ec24972b
commit 423d5ba221

View File

@@ -37,7 +37,16 @@ extern struct PyMethodDef JtReader_methods[];
extern "C" {
void AppJtReaderExport initJtReader() {
#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef JtReaderAPIDef = {
PyModuleDef_HEAD_INIT,
"JtReader", 0, -1, JtReader_methods,
NULL, NULL, NULL, NULL
};
PyModule_Create(&JtReaderAPIDef);
#else
(void) Py_InitModule("JtReader", JtReader_methods); /* mod name, table ptr */
#endif
// load dependent module
Base::Interpreter().loadModule("Mesh");