@@ -4725,6 +4725,7 @@ Pickler_clear(PicklerObject *self)
47254725    Py_CLEAR (self -> output_buffer );
47264726    Py_CLEAR (self -> write );
47274727    Py_CLEAR (self -> persistent_id );
4728+     Py_CLEAR (self -> persistent_id_attr );
47284729    Py_CLEAR (self -> dispatch_table );
47294730    Py_CLEAR (self -> fast_memo );
47304731    Py_CLEAR (self -> reducer_override );
@@ -4754,6 +4755,7 @@ Pickler_traverse(PicklerObject *self, visitproc visit, void *arg)
47544755    Py_VISIT (Py_TYPE (self ));
47554756    Py_VISIT (self -> write );
47564757    Py_VISIT (self -> persistent_id );
4758+     Py_VISIT (self -> persistent_id_attr );
47574759    Py_VISIT (self -> dispatch_table );
47584760    Py_VISIT (self -> fast_memo );
47594761    Py_VISIT (self -> reducer_override );
@@ -7227,6 +7229,7 @@ Unpickler_clear(UnpicklerObject *self)
72277229    Py_CLEAR (self -> peek );
72287230    Py_CLEAR (self -> stack );
72297231    Py_CLEAR (self -> persistent_load );
7232+     Py_CLEAR (self -> persistent_load_attr );
72307233    Py_CLEAR (self -> buffers );
72317234    if  (self -> buffer .buf  !=  NULL ) {
72327235        PyBuffer_Release (& self -> buffer );
@@ -7266,6 +7269,7 @@ Unpickler_traverse(UnpicklerObject *self, visitproc visit, void *arg)
72667269    Py_VISIT (self -> peek );
72677270    Py_VISIT (self -> stack );
72687271    Py_VISIT (self -> persistent_load );
7272+     Py_VISIT (self -> persistent_load_attr );
72697273    Py_VISIT (self -> buffers );
72707274    PyObject  * * memo  =  self -> memo ;
72717275    if  (memo ) {
0 commit comments