mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Define _Py_NO_RETURN for Microsoft C compiler (GH-8606)
This commit is contained in:
parent
fc96437db4
commit
cfc8831f5e
3 changed files with 8 additions and 6 deletions
|
@ -97,13 +97,15 @@ PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
|
|||
(defined(__GNUC_MAJOR__) && \
|
||||
((__GNUC_MAJOR__ >= 3) || \
|
||||
(__GNUC_MAJOR__ == 2) && (__GNUC_MINOR__ >= 5)))
|
||||
#define _Py_NO_RETURN __attribute__((__noreturn__))
|
||||
# define _Py_NO_RETURN __attribute__((__noreturn__))
|
||||
#elif defined(_MSC_VER)
|
||||
# define _Py_NO_RETURN __declspec(noreturn)
|
||||
#else
|
||||
#define _Py_NO_RETURN
|
||||
# define _Py_NO_RETURN
|
||||
#endif
|
||||
|
||||
/* Defined in Python/pylifecycle.c */
|
||||
PyAPI_FUNC(void) Py_FatalError(const char *message) _Py_NO_RETURN;
|
||||
PyAPI_FUNC(void) _Py_NO_RETURN Py_FatalError(const char *message);
|
||||
|
||||
#if defined(Py_DEBUG) || defined(Py_LIMITED_API)
|
||||
#define _PyErr_OCCURRED() PyErr_Occurred()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue