Skip to content

Commit c7213ac

Browse files
committed
make _tkinter.tkapp immutable
1 parent 8db0113 commit c7213ac

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Modules/_tkinter.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,11 +3326,14 @@ static PyType_Slot Tkapp_Type_slots[] = {
33263326

33273327

33283328
static PyType_Spec Tkapp_Type_spec = {
3329-
"_tkinter.tkapp",
3330-
sizeof(TkappObject),
3331-
0,
3332-
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION,
3333-
Tkapp_Type_slots,
3329+
.name = "_tkinter.tkapp",
3330+
.basicsize = sizeof(TkappObject),
3331+
.flags = (
3332+
Py_TPFLAGS_DEFAULT
3333+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
3334+
| Py_TPFLAGS_IMMUTABLETYPE
3335+
),
3336+
.slots = Tkapp_Type_slots,
33343337
};
33353338

33363339
static PyMethodDef moduleMethods[] =

0 commit comments

Comments
 (0)