Skip to content

Commit 82cf396

Browse files
kumaraditya303johng
authored andcommitted
enable deferred reference counting on functools.lru_cache objects
1 parent 948fd7e commit 82cf396

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Modules/_functoolsmodule.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,6 +1688,7 @@ lru_cache_new(PyTypeObject *type, PyObject *args, PyObject *kw)
16881688
obj->cache_info_type = Py_NewRef(cache_info_type);
16891689
obj->dict = NULL;
16901690
obj->weakreflist = NULL;
1691+
_PyObject_SetDeferredRefcount((PyObject *)obj);
16911692
return (PyObject *)obj;
16921693
}
16931694

0 commit comments

Comments
 (0)