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

@@ -82,7 +82,11 @@ PyObject* DrawViewClipPy::getChildViewNames(PyObject* args)
std::vector<std::string>::iterator it = strings.begin();
for( ; it != strings.end(); it++) {
#if PY_MAJOR_VERSION < 3
PyObject* pString = PyString_FromString(it->c_str()); //TODO: unicode & py3
#else
PyObject* pString = PyUnicode_FromString(it->c_str());
#endif
//int rc =
static_cast<void> (PyList_Append(result, pString));
}