mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
interrogatedb: Build even when _PyErr_OCCURRED is undefined
This commit is contained in:
parent
ea1ba281b5
commit
4d59ad4014
@ -303,8 +303,14 @@ template<class T> INLINE bool DTOOL_Call_ExtractThisPointer(PyObject *self, T *&
|
|||||||
// Functions related to error reporting.
|
// Functions related to error reporting.
|
||||||
EXPCL_INTERROGATEDB bool _Dtool_CheckErrorOccurred();
|
EXPCL_INTERROGATEDB bool _Dtool_CheckErrorOccurred();
|
||||||
|
|
||||||
|
// _PyErr_OCCURRED is an undocumented macro version of PyErr_Occurred.
|
||||||
|
// Some implementations of the CPython API (e.g. PyPy's cpyext) do not define
|
||||||
|
// it, so in these cases we just silently fall back to PyErr_Occurred.
|
||||||
|
#ifndef _PyErr_OCCURRED
|
||||||
|
#define _PyErr_OCCURRED() PyErr_Occurred()
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
// _PyErr_OCCURRED is an undocumented inline version of PyErr_Occurred.
|
|
||||||
#define Dtool_CheckErrorOccurred() (_PyErr_OCCURRED() != NULL)
|
#define Dtool_CheckErrorOccurred() (_PyErr_OCCURRED() != NULL)
|
||||||
#else
|
#else
|
||||||
#define Dtool_CheckErrorOccurred() _Dtool_CheckErrorOccurred()
|
#define Dtool_CheckErrorOccurred() _Dtool_CheckErrorOccurred()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user