Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Python compatibility patch for 3.0-3.2
  • Loading branch information
m-kuhn committed Mar 9, 2016
1 parent 2ce4b8a commit 632601b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/python/qgspythonutilsimpl.cpp
Expand Up @@ -33,8 +33,10 @@
#include <QStringList>
#include <QDir>

#ifdef PYTHON2
#if (PY_VERSION_HEX < 0x03000000)
#define PYOBJ2QSTRING(obj) PyString_AsString( obj )
#elif (PY_VERSION_HEX < 0x03030000)
#define PYOBJ2QSTRING(obj) QString::fromUtf8( PyBytes_AsString(PyUnicode_AsUTF8String( obj ) ) )
#else
#define PYOBJ2QSTRING(obj) QString::fromUtf8( PyUnicode_AsUTF8( obj ) )
#endif
Expand Down

0 comments on commit 632601b

Please sign in to comment.