Fix compile error on Python versions between 3.0.0 and 3.3.3

This commit is contained in:
rdb 2015-12-06 16:20:07 +01:00
parent 1bbfc1d9f6
commit eb4052d7b6

View File

@ -131,6 +131,12 @@ inline PyObject* doPy_RETURN_FALSE()
typedef long Py_hash_t;
#endif
#if PY_MAJOR_VERSION >= 3
// Python 3 versions before 3.3.3 defined this incorrectly.
#undef _PyErr_OCCURRED
#define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type)
#endif
using namespace std;
///////////////////////////////////////////////////////////////////////////////////