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

@@ -38,8 +38,11 @@ PyObject* DrawPagePy::addView(PyObject* args)
DrawView* view = pyView->getDrawViewPtr(); //get DrawView for pyView
int rc = page->addView(view);
#if PY_MAJOR_VERSION < 3
return PyInt_FromLong((long) rc);
#else
return PyLong_FromLong((long) rc);
#endif
}
PyObject* DrawPagePy::removeView(PyObject* args)
@@ -60,7 +63,11 @@ PyObject* DrawPagePy::removeView(PyObject* args)
int rc = page->removeView(view);
#if PY_MAJOR_VERSION < 3
return PyInt_FromLong((long) rc);
#else
return PyLong_FromLong((long) rc);
#endif
}