Skip to content
Permalink
Browse files

Python compatibility patch for 3.0-3.2

  • Loading branch information
m-kuhn committed Mar 9, 2016
1 parent 2ce4b8a commit 632601ba126a7316e13a1ab1ae19dd5ae7236886
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/python/qgspythonutilsimpl.cpp
@@ -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

0 comments on commit 632601b

Please sign in to comment.
You can’t perform that action at this time.