py3: ported MeshPart to python3

This commit is contained in:
wmayer
2016-01-24 02:33:54 +01:00
parent 707d6a0a4d
commit 59fb7ec2cd
3 changed files with 11 additions and 7 deletions

View File

@@ -27,6 +27,7 @@
#endif
#include <Base/Console.h>
#include <Base/PyObjectBase.h>
#include <Base/Interpreter.h>
@@ -35,7 +36,7 @@ extern PyObject* initModule();
}
/* Python entry */
PyMODINIT_FUNC initMeshPart()
PyMOD_INIT_FUNC(MeshPart)
{
// load dependent module
try {
@@ -44,8 +45,9 @@ PyMODINIT_FUNC initMeshPart()
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
PyMOD_Return(0);
}
(void)MeshPart::initModule();
PyObject* mod = MeshPart::initModule();
Base::Console().Log("Loading MeshPart module... done\n");
PyMOD_Return(mod);
}