+ simplify porting of MeshPart module to Python3

This commit is contained in:
wmayer
2016-01-20 22:38:45 +01:00
parent 4481208899
commit afcdd66734
5 changed files with 170 additions and 164 deletions

View File

@@ -30,15 +30,16 @@
#include <Base/Interpreter.h>
extern struct PyMethodDef MeshPart_methods[];
namespace MeshPart {
extern PyObject* initModule();
}
PyDoc_STRVAR(module_MeshPart_doc,
"This module is the MeshPart module.");
/* Python entry */
extern "C" {
void MeshPartExport initMeshPart()
PyMODINIT_FUNC initMeshPart()
{
// load dependent module
try {
@@ -49,15 +50,6 @@ void MeshPartExport initMeshPart()
PyErr_SetString(PyExc_ImportError, e.what());
return;
}
Py_InitModule3("MeshPart", MeshPart_methods, module_MeshPart_doc); /* mod name, table ptr */
(void)MeshPart::initModule();
Base::Console().Log("Loading MeshPart module... done\n");
// NOTE: To finish the initialization of our own type objects we must
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
// This function is responsible for adding inherited slots from a type's base class.
//MeshPart::FeatureViewPart ::init();
}
} // extern "C"