Gui: remove Py2 code from several src/Gui .cpp files
This commit is contained in:
@@ -377,7 +377,6 @@ PyMOD_INIT_FUNC(FreeCADGui)
|
||||
// is started in command mode
|
||||
if (Base::Type::fromName("Gui::BaseView").isBad())
|
||||
Gui::Application::initApplication();
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static struct PyModuleDef FreeCADGuiModuleDef = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"FreeCADGui", "FreeCAD GUI module\n", -1,
|
||||
@@ -386,9 +385,6 @@ PyMOD_INIT_FUNC(FreeCADGui)
|
||||
};
|
||||
PyObject* module = PyModule_Create(&FreeCADGuiModuleDef);
|
||||
return module;
|
||||
#else
|
||||
Py_InitModule3("FreeCADGui", FreeCADGui_methods, "FreeCAD GUI module\n");
|
||||
#endif
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
PyErr_Format(PyExc_ImportError, "%s\n", e.what());
|
||||
@@ -396,8 +392,6 @@ PyMOD_INIT_FUNC(FreeCADGui)
|
||||
catch (...) {
|
||||
PyErr_SetString(PyExc_ImportError, "Unknown runtime error occurred");
|
||||
}
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user