Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix reference cycles involving the types of grapheme iterators and segments
created by :func:`unicodedata.iter_graphemes`.
2 changes: 2 additions & 0 deletions Modules/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,7 @@ Segment_dealloc(PyObject *self)
static int
Segment_traverse(PyObject *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
Py_VISIT(((SegmentObject *)self)->string);
return 0;
}
Expand Down Expand Up @@ -2057,6 +2058,7 @@ GBI_dealloc(PyObject *self)
static int
GBI_traverse(PyObject *self, visitproc visit, void *arg)
{
Py_VISIT(Py_TYPE(self));
Py_VISIT(((GraphemeBreakIterator *)self)->iter.str);
return 0;
}
Expand Down
Loading