summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/dlg
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/dlg')
-rw-r--r--Mac/Modules/dlg/_Dlgmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
index 50edc87..c4e3ed8 100644
--- a/Mac/Modules/dlg/_Dlgmodule.c
+++ b/Mac/Modules/dlg/_Dlgmodule.c
@@ -172,7 +172,7 @@ int DlgObj_Convert(PyObject *v, DialogPtr *p_itself)
static void DlgObj_dealloc(DialogObject *self)
{
DisposeDialog(self->ob_itself);
- PyObject_Del(self);
+ self->ob_type->tp_free((PyObject *)self);
}
static PyObject *DlgObj_DrawDialog(DialogObject *_self, PyObject *_args)
@@ -1590,6 +1590,7 @@ void init_Dlg(void)
PyDict_SetItemString(d, "Error", Dlg_Error) != 0)
return;
Dialog_Type.ob_type = &PyType_Type;
+ if (PyType_Ready(&Dialog_Type) < 0) return;
Py_INCREF(&Dialog_Type);
PyModule_AddObject(m, "Dialog", (PyObject *)&Dialog_Type);
/* Backward-compatible name */