bpo-38205: Py_UNREACHABLE() calls Py_FatalError() (GH-16290) (GH-16306)

(cherry picked from commit b1542583be)
This commit is contained in:
Victor Stinner 2019-09-20 23:36:32 +02:00 committed by GitHub
parent b50edac42f
commit 245d439320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -100,6 +100,7 @@
# define Py_UNUSED(name) _unused_ ## name
#endif
#define Py_UNREACHABLE() abort()
#define Py_UNREACHABLE() \
Py_FatalError("Unreachable C code path reached")
#endif /* Py_PYMACRO_H */

View File

@ -0,0 +1 @@
The :c:func:`Py_UNREACHABLE` macro now calls :c:func:`Py_FatalError`.