py3: ported PartDesign to python3

This commit is contained in:
wmayer
2016-01-23 19:04:27 +01:00
committed by looooo
parent da1081bc98
commit 381419c267
3 changed files with 14 additions and 9 deletions

View File

@@ -27,6 +27,7 @@
#endif
#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include <Base/Interpreter.h>
#include "FeaturePad.h"
@@ -63,7 +64,7 @@ extern PyObject* initModule();
}
/* Python entry */
PyMODINIT_FUNC init_PartDesign()
PyMOD_INIT_FUNC(_PartDesign)
{
// load dependent module
try {
@@ -72,10 +73,10 @@ PyMODINIT_FUNC init_PartDesign()
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
PyMOD_Return(0);
}
(void)PartDesign::initModule();
PyObject* mod = PartDesign::initModule();
Base::Console().Log("Loading PartDesign module... done\n");
@@ -141,4 +142,6 @@ PyMODINIT_FUNC init_PartDesign()
PartDesign::Wedge ::init();
PartDesign::AdditiveWedge ::init();
PartDesign::SubtractiveWedge ::init();
PyMOD_Return(mod);
}