py3: ported module init to python3
This commit is contained in:
@@ -100,6 +100,12 @@ private:
|
||||
return Py::None();
|
||||
}
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
{
|
||||
return (new Module())->module().ptr();
|
||||
}
|
||||
|
||||
} // namespace WebGui
|
||||
|
||||
|
||||
@@ -108,10 +114,10 @@ PyMODINIT_FUNC initWebGui()
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
return;
|
||||
PyMOD_Return(0);
|
||||
}
|
||||
|
||||
new WebGui::Module();
|
||||
PyObject* mod = WebGui::initModule();
|
||||
Base::Console().Log("Loading GUI of Web module... done\n");
|
||||
|
||||
// instantiating the commands
|
||||
@@ -120,4 +126,6 @@ PyMODINIT_FUNC initWebGui()
|
||||
|
||||
// add resources and reloads the translators
|
||||
loadWebResource();
|
||||
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user