NDEBUG against a Python built with NDEBUG defined.
msg, expr and function can be NULL. */
-PyAPI_FUNC(void) _PyObject_AssertFailed(
+PyAPI_FUNC(void) _Py_NO_RETURN _PyObject_AssertFailed(
PyObject *obj,
const char *expr,
const char *msg,
Py_RETURN_NONE;
}
-static void
+static void _Py_NO_RETURN
faulthandler_fatal_error_thread(void *plock)
{
-#ifndef __clang__
- PyThread_type_lock *lock = (PyThread_type_lock *)plock;
-#endif
-
Py_FatalError("in new thread");
-
-#ifndef __clang__
- /* Issue #28152: Py_FatalError() is declared with
- __attribute__((__noreturn__)). GCC emits a warning without
- "PyThread_release_lock()" (compiler bug?), but Clang is smarter and
- emits a warning on the return. */
-
- /* notify the caller that we are done */
- PyThread_release_lock(lock);
-#endif
}
static PyObject *
}
/* 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
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
}
-void
+void _Py_NO_RETURN
_PyObject_AssertFailed(PyObject *obj, const char *expr, const char *msg,
const char *file, int line, const char *function)
{
return PyUnicode_FromString("<dummy key>");
}
-static void
+static void _Py_NO_RETURN
dummy_dealloc(PyObject* ignore)
{
Py_FatalError("deallocating <dummy key>");