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

@@ -49,7 +49,11 @@ PyObject* DrawProjGroupPy::removeProjection(PyObject* args)
DrawProjGroup* projGroup = getDrawProjGroupPtr();
int i = projGroup->removeProjection(projType);
#if PY_MAJOR_VERSION < 3
return PyInt_FromLong((long) i);
#else
return PyLong_FromLong((long) i);
#endif
}
PyObject* DrawProjGroupPy::purgeProjections(PyObject* /*args*/)
@@ -57,7 +61,11 @@ PyObject* DrawProjGroupPy::purgeProjections(PyObject* /*args*/)
DrawProjGroup* projGroup = getDrawProjGroupPtr();
int i = projGroup->purgeProjections();
#if PY_MAJOR_VERSION < 3
return PyInt_FromLong((long) i);
#else
return PyLong_FromLong((long) i);
#endif
}
PyObject* DrawProjGroupPy::getItemByLabel(PyObject* args)