mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-38631: Add _Py_NO_RETURN to functions calling Py_FatalError() (GH-18278)
Add _Py_NO_RETURN to functions calling Py_FatalError(): * _PyObject_AssertFailed() * dummy_dealloc() * faulthandler_fatal_error_thread() * none_dealloc() * notimplemented_dealloc()
This commit is contained in:
parent
17c68b8107
commit
2a4903fcce
4 changed files with 6 additions and 20 deletions
|
@ -1646,7 +1646,7 @@ none_repr(PyObject *op)
|
|||
}
|
||||
|
||||
/* ARGUSED */
|
||||
static void
|
||||
static void _Py_NO_RETURN
|
||||
none_dealloc(PyObject* ignore)
|
||||
{
|
||||
/* This should never get called, but we also don't want to SEGV if
|
||||
|
@ -1784,7 +1784,7 @@ notimplemented_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|||
Py_RETURN_NOTIMPLEMENTED;
|
||||
}
|
||||
|
||||
static void
|
||||
static void _Py_NO_RETURN
|
||||
notimplemented_dealloc(PyObject* ignore)
|
||||
{
|
||||
/* This should never get called, but we also don't want to SEGV if
|
||||
|
@ -2225,7 +2225,7 @@ _PyTrash_thread_destroy_chain(void)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
void _Py_NO_RETURN
|
||||
_PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
|
||||
const char *file, int line, const char *function)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue