py3: FEM, PyMods, preprocessor conditions, Py::Long vs Py::Int

This commit is contained in:
looooo
2017-02-18 20:58:58 +01:00
committed by wmayer
parent 3fab41f567
commit 5c0bcf611f
6 changed files with 135 additions and 79 deletions

View File

@@ -92,14 +92,14 @@ extern PyObject* initModule();
/* Python entry */
PyMODINIT_FUNC initFemGui()
PyMOD_INIT_FUNC(FemGui)
{
if (!Gui::Application::Instance) {
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
return;
PyMOD_Return(0);
}
(void) FemGui::initModule();
PyObject* mod = FemGui::initModule();
Base::Console().Log("Loading GUI of Fem module... done\n");
// instantiating the commands
@@ -161,4 +161,6 @@ PyMODINIT_FUNC initFemGui()
// add resources and reloads the translators
loadFemResource();
PyMOD_Return(mod);
}