summaryrefslogtreecommitdiffstats
path: root/Modules/_tracemalloc.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-03-14 16:01:32 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-03-14 16:01:32 (GMT)
commitd222653f8f39733f65ea93bfeab7748185ba4ea8 (patch)
treef279d38658a345c4ae2d2f7a912703df8e4cfcab /Modules/_tracemalloc.c
parent791da1cc264574f8f3e44570d0fce293f755fdf3 (diff)
downloadcpython-d222653f8f39733f65ea93bfeab7748185ba4ea8.zip
cpython-d222653f8f39733f65ea93bfeab7748185ba4ea8.tar.gz
cpython-d222653f8f39733f65ea93bfeab7748185ba4ea8.tar.bz2
Issue #26558: Remove useless check in tracemalloc
The first instruction of tracemalloc_add_trace() is traceback_new() which already checks the GIL.
Diffstat (limited to 'Modules/_tracemalloc.c')
-rw-r--r--Modules/_tracemalloc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index 226a473..d62e682 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -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;