From b2e5794870eb4728ddfaafc0f79a40299576434f Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 14 Sep 2017 18:13:16 -0700 Subject: bpo-31338 (#3374) * Add Py_UNREACHABLE() as an alias to abort(). * Use Py_UNREACHABLE() instead of assert(0) * Convert more unreachable code to use Py_UNREACHABLE() * Document Py_UNREACHABLE() and a few other macros. --- Objects/stringlib/eq.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Objects/stringlib') diff --git a/Objects/stringlib/eq.h b/Objects/stringlib/eq.h index f8fd384a37..ff22f91371 100644 --- a/Objects/stringlib/eq.h +++ b/Objects/stringlib/eq.h @@ -10,8 +10,7 @@ unicode_eq(PyObject *aa, PyObject *bb) PyUnicodeObject *b = (PyUnicodeObject *)bb; if (PyUnicode_READY(a) == -1 || PyUnicode_READY(b) == -1) { - assert(0 && "unicode_eq ready fail"); - return 0; + Py_UNREACHABLE(); } if (PyUnicode_GET_LENGTH(a) != PyUnicode_GET_LENGTH(b)) -- cgit v1.2.1