py3.7 fix

PyUnicode_AsUTF8() returns const char* in py3.7 instead of char*. Making
changes to reflect that which should also be safe in
other Python versions.
This commit is contained in:
Michal Ulianko
2018-08-17 14:42:21 +02:00
committed by wmayer
parent 591c1d32cd
commit faf8834484
12 changed files with 34 additions and 34 deletions

View File

@@ -1437,7 +1437,7 @@ Py::Object PyResource::setValue(const Py::Tuple& args)
#endif
continue;
#if PY_MAJOR_VERSION >= 3
char* pItem = PyUnicode_AsUTF8(item);
const char* pItem = PyUnicode_AsUTF8(item);
#else
char* pItem = PyString_AsString(item);
#endif