We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7239da7 commit 96146ddCopy full SHA for 96146dd
Python/tracemalloc.c
@@ -338,13 +338,8 @@ traceback_hash(traceback_t *traceback)
338
static void
339
traceback_get_frames(traceback_t *traceback)
340
{
341
- PyThreadState *tstate = PyGILState_GetThisThreadState();
342
- if (tstate == NULL) {
343
-#ifdef TRACE_DEBUG
344
- tracemalloc_error("failed to get the current thread state");
345
-#endif
346
- return;
347
- }
+ PyThreadState *tstate = _PyThreadState_GET();
+ assert(tstate != NULL);
348
349
_PyInterpreterFrame *pyframe = _PyThreadState_GetFrame(tstate);
350
while (pyframe) {
0 commit comments