py3: ported Measure and TechDraw

This commit is contained in:
Yorik van Havre
2016-10-01 17:25:45 -03:00
committed by wmayer
parent a0aa4fdfef
commit 5590acdfa5
10 changed files with 99 additions and 34 deletions

View File

@@ -15,6 +15,7 @@
#endif
#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include <Base/Interpreter.h>
#include "DrawPage.h"
@@ -40,11 +41,11 @@
#include "DrawViewDetail.h"
namespace TechDraw {
extern PyObject* initModule();
extern PyObject* initModule();
}
/* Python entry */
PyMODINIT_FUNC initTechDraw()
PyMOD_INIT_FUNC(TechDraw)
{
// load dependent module
try {
@@ -53,9 +54,9 @@ PyMODINIT_FUNC initTechDraw()
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
PyMOD_Return(0);
}
(void)TechDraw::initModule();
PyObject* mod = TechDraw::initModule();
Base::Console().Log("Loading TechDraw module... done\n");
@@ -96,4 +97,5 @@ PyMODINIT_FUNC initTechDraw()
TechDraw::DrawViewMultiPython ::init();
TechDraw::DrawTemplatePython ::init();
TechDraw::DrawViewSymbolPython::init();
PyMOD_Return(mod);
}