Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add heap types to traverse, clear and free functions
  • Loading branch information
CharlieZhao95 committed Jan 25, 2022
commit 2905ef4fbee43af76aaa52227ab799fa52a26d59
6 changes: 6 additions & 0 deletions Modules/_pickle.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ _Pickle_ClearState(PickleState *st)
Py_CLEAR(st->partial);
Py_CLEAR(st->Pickler_Type);
Py_CLEAR(st->Unpickler_Type);
Py_CLEAR(st->Pdata_Type);
Py_CLEAR(st->PicklerMemoProxyType);
Py_CLEAR(st->UnpicklerMemoProxyType);
}

/* Initialize the given pickle module state. */
Expand Down Expand Up @@ -7912,6 +7915,9 @@ pickle_traverse(PyObject *m, visitproc visit, void *arg)
Py_VISIT(st->partial);
Py_VISIT(st->Pickler_Type);
Py_VISIT(st->Unpickler_Type);
Py_VISIT(st->Pdata_Type);
Py_VISIT(st->PicklerMemoProxyType);
Py_VISIT(st->UnpicklerMemoProxyType);
return 0;
}

Expand Down