summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index b7611d5..c440e0d 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -2013,7 +2013,11 @@ _PyFloat_ClearFreeList(_PyFreeListState *freelist_state, int is_finalization)
void
_PyFloat_Fini(_PyFreeListState *state)
{
+ // With Py_GIL_DISABLED:
+ // the freelists for the current thread state have already been cleared.
+#ifndef Py_GIL_DISABLED
_PyFloat_ClearFreeList(state, 1);
+#endif
}
void