mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
py_panda: Fix definition of _PyErr_OCCURRED for Python >3.12.0a5
It should not be redefined for Python versions after 3.3.3, and if it's not defined by Python, it should just map to PyErr_Occurred() See also #1457
This commit is contained in:
parent
173dd67b52
commit
a9e9cfae1c
@ -127,8 +127,10 @@ typedef long Py_hash_t;
|
|||||||
|
|
||||||
#if PY_MAJOR_VERSION >= 3
|
#if PY_MAJOR_VERSION >= 3
|
||||||
// Python 3 versions before 3.3.3 defined this incorrectly.
|
// Python 3 versions before 3.3.3 defined this incorrectly.
|
||||||
# undef _PyErr_OCCURRED
|
# if PY_VERSION_HEX < 0x03030300
|
||||||
# define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type)
|
# undef _PyErr_OCCURRED
|
||||||
|
# define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type)
|
||||||
|
# endif
|
||||||
|
|
||||||
// Python versions before 3.3 did not define this.
|
// Python versions before 3.3 did not define this.
|
||||||
# if PY_VERSION_HEX < 0x03030000
|
# if PY_VERSION_HEX < 0x03030000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user