py3: ported Measure and TechDraw

This commit is contained in:
Yorik van Havre
2017-02-21 13:59:30 +01:00
committed by wmayer
parent f2dc8c5d31
commit e13d4a7882
10 changed files with 99 additions and 34 deletions
+8 -1
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
}