Visitar URL original
[3.14] gh-74902: Add Unicode Grapheme Cluster Break algorithm (GH-143076) by StanFromIreland · Pull Request #148247 · python/cpython · GitHub
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
Fix refleaks in new unicodedata classes added in gh-74902 (GH-143843)
  • Loading branch information
serhiy-storchaka authored and StanFromIreland committed Apr 8, 2026
commit a4665b5067266becc2ec3f08ec7246199aa5d086
8 changes: 6 additions & 2 deletions Modules/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,9 +1875,11 @@ typedef struct {
static void
Segment_dealloc(PyObject *self)
{
PyTypeObject *tp = Py_TYPE(self);
PyObject_GC_UnTrack(self);
Py_DECREF(((SegmentObject *)self)->string);
PyObject_GC_Del(self);
tp->tp_free(self);
Py_DECREF(tp);
}

static int
Expand Down Expand Up @@ -1949,9 +1951,11 @@ typedef struct {
static void
GBI_dealloc(PyObject *self)
{
PyTypeObject *tp = Py_TYPE(self);
PyObject_GC_UnTrack(self);
Py_DECREF(((GraphemeBreakIterator *)self)->iter.str);
PyObject_GC_Del(self);
tp->tp_free(self);
Py_DECREF(tp);
}

static int
Expand Down