@@ -1255,8 +1255,8 @@ static int
|
1255 | 1255 | lru_cache_tp_clear(lru_cache_object *self) |
1256 | 1256 | { |
1257 | 1257 | lru_list_elem *list = lru_cache_unlink_list(self); |
1258 | | -Py_CLEAR(self->func); |
1259 | 1258 | Py_CLEAR(self->cache); |
| 1259 | +Py_CLEAR(self->func); |
1260 | 1260 | Py_CLEAR(self->kwd_mark); |
1261 | 1261 | Py_CLEAR(self->lru_list_elem_type); |
1262 | 1262 | Py_CLEAR(self->cache_info_type); |
@@ -1342,15 +1342,17 @@ lru_cache_deepcopy(PyObject *self, PyObject *unused)
|
1342 | 1342 | static int |
1343 | 1343 | lru_cache_tp_traverse(lru_cache_object *self, visitproc visit, void *arg) |
1344 | 1344 | { |
| 1345 | +Py_VISIT(Py_TYPE(self)); |
1345 | 1346 | lru_list_elem *link = self->root.next; |
1346 | 1347 | while (link != &self->root) { |
1347 | 1348 | lru_list_elem *next = link->next; |
1348 | 1349 | Py_VISIT(link->key); |
1349 | 1350 | Py_VISIT(link->result); |
| 1351 | +Py_VISIT(Py_TYPE(link)); |
1350 | 1352 | link = next; |
1351 | 1353 | } |
1352 | | -Py_VISIT(self->func); |
1353 | 1354 | Py_VISIT(self->cache); |
| 1355 | +Py_VISIT(self->func); |
1354 | 1356 | Py_VISIT(self->kwd_mark); |
1355 | 1357 | Py_VISIT(self->lru_list_elem_type); |
1356 | 1358 | Py_VISIT(self->cache_info_type); |
|