TD: remove some more deprecated Py2 code

This commit is contained in:
wmayer
2021-04-26 11:01:59 +02:00
parent 1aad309886
commit f5f3acc2a3

View File

@@ -63,11 +63,7 @@ PyObject* DrawViewDimensionPy::getText(PyObject* args)
DrawViewDimension* dvd = getDrawViewDimensionPtr();
std::string textString = dvd->getFormattedDimensionValue();
//TODO: check multiversion code!
#if PY_MAJOR_VERSION >= 3
PyObject* pyText = Base::PyAsUnicodeObject(textString);
#else
PyObject *pyText = PyString_FromString(textString.c_str());
#endif
return pyText;
}