[TD] remove Py2 code from TD

This commit is contained in:
luz paz
2021-04-21 22:06:59 -04:00
committed by wwmayer
parent ba99b72984
commit 738a697d94
11 changed files with 0 additions and 91 deletions

View File

@@ -553,17 +553,10 @@ PyObject* DrawViewPartPy::makeCenterLine(PyObject *args)
int i = 0;
for ( ; i < size; i++) {
PyObject* po = PyList_GetItem(pSubs, i);
#if PY_MAJOR_VERSION >= 3
if (PyUnicode_Check(po)) {
std::string s = PyUnicode_AsUTF8(po); //py3 only!!!
subs.push_back(s);
}
#else
if (PyString_Check(po)) {
std::string s = PyString_AsString(po); //py2 only!!!
subs.push_back(s);
}
#endif
}
}
CenterLine* cl = nullptr;