+ make code more readable

This commit is contained in:
wmayer
2016-01-21 16:07:07 +01:00
parent c9f168d3a2
commit f47cc169ae
2 changed files with 27 additions and 24 deletions

View File

@@ -220,11 +220,13 @@ Application::Application(ParameterManager * /*pcSysParamMngr*/,
PyObject* pBaseModule = Py_InitModule3("__FreeCADBase__", NULL,
"The Base module contains the classes for the geometric basics\n"
"like vector, matrix, bounding box, placement, rotation, axis, ...");
Base::BaseExceptionFreeCADError = PyErr_NewException(
"Base.FreeCADError", PyExc_RuntimeError, NULL);
// Python exceptions
Base::BaseExceptionFreeCADError = PyErr_NewException("Base.FreeCADError", PyExc_RuntimeError, NULL);
Py_INCREF(Base::BaseExceptionFreeCADError);
PyModule_AddObject(pBaseModule, "FreeCADError",
Base::BaseExceptionFreeCADError);
PyModule_AddObject(pBaseModule, "FreeCADError", Base::BaseExceptionFreeCADError);
// Python types
Base::Interpreter().addType(&Base::VectorPy ::Type,pBaseModule,"Vector");
Base::Interpreter().addType(&Base::MatrixPy ::Type,pBaseModule,"Matrix");
Base::Interpreter().addType(&Base::BoundBoxPy ::Type,pBaseModule,"BoundBox");