Misc: remove py2 code

This commit is contained in:
luz paz
2021-04-26 18:58:07 -04:00
committed by wwmayer
parent 2f276601f8
commit 05a22ec22d
4 changed files with 0 additions and 24 deletions

View File

@@ -57,16 +57,12 @@ void AssemblyExport initAssembly()
PyErr_SetString(PyExc_ImportError, e.what());
return;
}
#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef AssemblyAPIDef = {
PyModuleDef_HEAD_INIT,
"Assembly", module_Assembly_doc, -1, Assembly_methods,
NULL, NULL, NULL, NULL
};
PyModule_Create(&AssemblyAPIDef);
#else
Py_InitModule3("Assembly", Assembly_methods, module_Assembly_doc); /* mod name, table ptr */
#endif
Base::Console().Log("Loading Assembly module... done\n");

View File

@@ -68,16 +68,12 @@ void AssemblyGuiExport initAssemblyGui()
return;
}
#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef AssemblyGuiAPIDef = {
PyModuleDef_HEAD_INIT,
"AssemblyGui", 0, -1, AssemblyGui_Import_methods,
NULL, NULL, NULL, NULL
};
PyModule_Create(&AssemblyGuiAPIDef);
#else
(void) Py_InitModule("AssemblyGui", AssemblyGui_Import_methods); /* mod name, table ptr */
#endif
Base::Console().Log("Loading GUI of Assembly module... done\n");
// directly load the module for usage in commands

View File

@@ -37,16 +37,12 @@ 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");