From: Victor Stinner Date: Mon, 9 Mar 2015 14:55:37 +0000 (+0100) Subject: Issue #23571: Oops, fix #ifdef assert() X-Git-Tag: v3.5.0a3~216 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=283f3f8ab326bfd43f9c7c7859ae9815a7545b64;p=thirdparty%2FPython%2Fcpython.git Issue #23571: Oops, fix #ifdef assert() assert() are noop when NDEBUG is defined. We want the opposite. --- diff --git a/Objects/abstract.c b/Objects/abstract.c index ab1347683e3c..50d893d520ac 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2078,7 +2078,7 @@ _Py_CheckFunctionResult(PyObject *result, const char *func_name) { int err_occurred = (PyErr_Occurred() != NULL); -#ifdef NDEBUG +#ifndef NDEBUG /* In debug mode: abort() with an assertion error. Use two different assertions, so if an assertion fails, it's possible to know if result was set or not and if an exception was raised or not. */