]> granicus.if.org Git - python/commitdiff
Issue #23571: Oops, fix #ifdef assert()
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 9 Mar 2015 14:55:37 +0000 (15:55 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 9 Mar 2015 14:55:37 +0000 (15:55 +0100)
assert() are noop when NDEBUG is defined. We want the opposite.

Objects/abstract.c

index ab1347683e3cfb234324e6437da61076d0f32258..50d893d520ac283329546392c14540f8cc5261a1 100644 (file)
@@ -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. */