Skip to content

Commit dbb343f

Browse files
committed
revert changes to _tkinter.Tcl_Obj; they will be made later
1 parent a9c01ef commit dbb343f

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

Modules/_tkinter.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -589,14 +589,10 @@ Tkapp_New(const char *screenName, const char *className,
589589
int interactive, int wantobjects, int wantTk, int sync,
590590
const char *use)
591591
{
592-
PyTypeObject *type;
593592
TkappObject *v;
594593
char *argv0;
595594

596-
type = (PyTypeObject *)Tkapp_Type;
597-
assert(type != NULL);
598-
assert(type->tp_alloc != NULL);
599-
v = (TkappObject *)type->tp_alloc(type, 0);
595+
v = PyObject_New(TkappObject, (PyTypeObject *) Tkapp_Type);
600596
if (v == NULL)
601597
return NULL;
602598

@@ -910,14 +906,11 @@ static PyType_Slot PyTclObject_Type_slots[] = {
910906
};
911907

912908
static PyType_Spec PyTclObject_Type_spec = {
913-
.name = "_tkinter.Tcl_Obj",
914-
.basicsize = sizeof(PyTclObject),
915-
.flags = (
916-
Py_TPFLAGS_DEFAULT
917-
| Py_TPFLAGS_DISALLOW_INSTANTIATION
918-
| Py_TPFLAGS_IMMUTABLETYPE
919-
),
920-
.slots = PyTclObject_Type_slots,
909+
"_tkinter.Tcl_Obj",
910+
sizeof(PyTclObject),
911+
0,
912+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION,
913+
PyTclObject_Type_slots,
921914
};
922915

923916

0 commit comments

Comments
 (0)