]> granicus.if.org Git - python/commitdiff
Issue #26558: Remove useless check in tracemalloc
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 14 Mar 2016 16:01:32 +0000 (17:01 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 14 Mar 2016 16:01:32 +0000 (17:01 +0100)
The first instruction of tracemalloc_add_trace() is traceback_new() which
already checks the GIL.

Modules/_tracemalloc.c

index 226a473b4c74e862f124391ae4a6a27720744906..d62e68254df393463906c997b834e7edb1301f62 100644 (file)
@@ -439,10 +439,6 @@ tracemalloc_add_trace(void *ptr, size_t size)
     trace_t trace;
     int res;
 
-#ifdef WITH_THREAD
-    assert(PyGILState_Check());
-#endif
-
     traceback = traceback_new();
     if (traceback == NULL)
         return -1;