summaryrefslogtreecommitdiffstats
path: root/Objects/sliceobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/sliceobject.c')
-rw-r--r--Objects/sliceobject.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 8b9d6bb..9880c12 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -103,8 +103,11 @@ PyObject _Py_EllipsisObject = _PyObject_HEAD_INIT(&PyEllipsis_Type);
/* Slice object implementation */
-void _PySlice_ClearCache(_PyFreeListState *state)
+void _PySlice_ClearFreeList(_PyFreeListState *state, int is_finalization)
{
+ if (!is_finalization) {
+ return;
+ }
#ifdef WITH_FREELISTS
PySliceObject *obj = state->slices.slice_cache;
if (obj != NULL) {
@@ -114,13 +117,6 @@ void _PySlice_ClearCache(_PyFreeListState *state)
#endif
}
-void _PySlice_Fini(_PyFreeListState *state)
-{
-#ifdef WITH_FREELISTS
- _PySlice_ClearCache(state);
-#endif
-}
-
/* start, stop, and step are python objects with None indicating no
index is present.
*/