[CheckGeometry] fix python2 build
This commit is contained in:
committed by
Yorik van Havre
parent
1b8a410d29
commit
9bb3b0e046
@@ -326,7 +326,7 @@ std::string InterpreterSingleton::runStringWithKey(const char *psCmd, const char
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
PyObject* str = PyUnicode_AsEncodedString(key_return_value, "utf-8", "~E~");
|
||||
#else
|
||||
PyObject* str = PyString_FromString(key_return_value);
|
||||
PyObject* str = PyObject_Str(key_return_value);
|
||||
#endif
|
||||
const char* result = PyBytes_AS_STRING(str);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user