File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1240,8 +1240,8 @@ static int
1240
1240
lru_cache_tp_clear (lru_cache_object * self )
1241
1241
{
1242
1242
lru_list_elem * list = lru_cache_unlink_list (self );
1243
- Py_CLEAR (self -> func );
1244
1243
Py_CLEAR (self -> cache );
1244
+ Py_CLEAR (self -> func );
1245
1245
Py_CLEAR (self -> kwd_mark );
1246
1246
Py_CLEAR (self -> lru_list_elem_type );
1247
1247
Py_CLEAR (self -> cache_info_type );
@@ -1327,15 +1327,17 @@ lru_cache_deepcopy(PyObject *self, PyObject *unused)
1327
1327
static int
1328
1328
lru_cache_tp_traverse (lru_cache_object * self , visitproc visit , void * arg )
1329
1329
{
1330
+ Py_VISIT (Py_TYPE (self ));
1330
1331
lru_list_elem * link = self -> root .next ;
1331
1332
while (link != & self -> root ) {
1332
1333
lru_list_elem * next = link -> next ;
1333
1334
Py_VISIT (link -> key );
1334
1335
Py_VISIT (link -> result );
1336
+ Py_VISIT (Py_TYPE (link ));
1335
1337
link = next ;
1336
1338
}
1337
- Py_VISIT (self -> func );
1338
1339
Py_VISIT (self -> cache );
1340
+ Py_VISIT (self -> func );
1339
1341
Py_VISIT (self -> kwd_mark );
1340
1342
Py_VISIT (self -> lru_list_elem_type );
1341
1343
Py_VISIT (self -> cache_info_type );
You can’t perform that action at this time.
0 commit comments