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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user