]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Enhance _tracemalloc debug mode
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 22 Mar 2016 23:17:04 +0000 (00:17 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 22 Mar 2016 23:17:04 +0000 (00:17 +0100)
Issue #26588: Enhance assertion in set_reentrant()

Modules/_tracemalloc.c

index 0e5f84699c359c1fcf2ad3677458e8843b046d6d..6327c95d2a6d035d32561f52c57e731b1190ec3b 100644 (file)
@@ -189,7 +189,7 @@ get_reentrant(void)
 static void
 set_reentrant(int reentrant)
 {
-    assert(!reentrant || !get_reentrant());
+    assert(reentrant != tracemalloc_reentrant);
     tracemalloc_reentrant = reentrant;
 }
 #endif