Skip to content

Commit 9bf4168

Browse files
enable deferred reference counting on functools.lru_cache objects
1 parent a3a611b commit 9bf4168

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Modules/_functoolsmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,7 @@ lru_cache_new(PyTypeObject *type, PyObject *args, PyObject *kw)
16561656
obj->cache_info_type = Py_NewRef(cache_info_type);
16571657
obj->dict = NULL;
16581658
obj->weakreflist = NULL;
1659+
_PyObject_SetDeferredRefcount((PyObject *)obj);
16591660
return (PyObject *)obj;
16601661
}
16611662

0 commit comments

Comments
 (0)