Skip to content

Commit

Permalink
py3: ported Inspection to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer authored and looooo committed Feb 12, 2017
1 parent 944d62e commit 04e0620
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/Mod/Inspection/App/AppInspection.cpp
Expand Up @@ -30,6 +30,7 @@
#include <CXX/Objects.hxx>

#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include "InspectionFeature.h"


Expand All @@ -56,15 +57,16 @@ PyObject* initModule()


/* Python entry */
PyMODINIT_FUNC initInspection() {

PyMOD_INIT_FUNC(Inspection)
{
// ADD YOUR CODE HERE
//
//
(void)Inspection::initModule();
PyObject* mod = Inspection::initModule();
Base::Console().Log("Loading Inspection module... done\n");

Inspection::PropertyDistanceList ::init();
Inspection::Feature ::init();
Inspection::Group ::init();
PyMOD_Return(mod);
}
7 changes: 4 additions & 3 deletions src/Mod/Inspection/Gui/AppInspectionGui.cpp
Expand Up @@ -62,11 +62,11 @@ PyObject* initModule()


/* Python entry */
PyMODINIT_FUNC initInspectionGui()
PyMOD_INIT_FUNC(InspectionGui)
{
if (!Gui::Application::Instance) {
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
return;
PyMOD_Return(0);
}

// instanciating the commands
Expand All @@ -79,6 +79,7 @@ PyMODINIT_FUNC initInspectionGui()
//
//

(void)InspectionGui::initModule();
PyObject* mod = InspectionGui::initModule();
Base::Console().Log("Loading GUI of Inspection module... done\n");
PyMOD_Return(mod);
}

0 comments on commit 04e0620

Please sign in to comment.