App: remove Py2 code from several src/App .cpp files

This commit is contained in:
luz paz
2021-04-14 10:18:27 -04:00
committed by wwmayer
parent ee98ed5baf
commit fc6d1292d1
12 changed files with 0 additions and 268 deletions

View File

@@ -286,11 +286,7 @@ void PropertyListsBase::_setPyObject(PyObject *value) {
for(auto it=dict.begin();it!=dict.end();++it) {
const auto &item = *it;
PyObject *key = item.first.ptr();
#if PY_MAJOR_VERSION < 3
if(!PyInt_Check(key))
#else
if(!PyLong_Check(key))
#endif
throw Base::TypeError("expect key type to be integer");
long idx = PyLong_AsLong(key);
if(idx<-1 || idx>listSize)