Skip to content

Commit 53c9fe8

Browse files
committed
make _tkinter.Tcl_Obj immutable
1 parent c919d02 commit 53c9fe8

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
@@ -906,11 +906,14 @@ static PyType_Slot PyTclObject_Type_slots[] = {
906906
};
907907

908908
static PyType_Spec PyTclObject_Type_spec = {
909-
"_tkinter.Tcl_Obj",
910-
sizeof(PyTclObject),
911-
0,
912-
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION,
913-
PyTclObject_Type_slots,
909+
.name = "_tkinter.Tcl_Obj",
910+
.basicsize = sizeof(PyTclObject),
911+
.flags = (
912+
Py_TPFLAGS_DEFAULT
913+
| Py_TPFLAGS_DISALLOW_INSTANTIATION
914+
| Py_TPFLAGS_IMMUTABLETYPE
915+
),
916+
.slots = PyTclObject_Type_slots,
914917
};
915918

916919

0 commit comments

Comments
 (0)