summaryrefslogtreecommitdiff
path: root/Modules/_curses_panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_curses_panel.c')
-rw-r--r--Modules/_curses_panel.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/Modules/_curses_panel.c b/Modules/_curses_panel.c
index 867be7d1fc..26cea8ca45 100644
--- a/Modules/_curses_panel.c
+++ b/Modules/_curses_panel.c
@@ -329,12 +329,6 @@ static PyMethodDef PyCursesPanel_Methods[] = {
{NULL, NULL} /* sentinel */
};
-static PyObject *
-PyCursesPanel_GetAttr(PyCursesPanelObject *self, char *name)
-{
- return Py_FindMethod(PyCursesPanel_Methods, (PyObject *)self, name);
-}
-
/* -------------------------------------------------------*/
PyTypeObject PyCursesPanel_Type = {
@@ -345,14 +339,28 @@ PyTypeObject PyCursesPanel_Type = {
/* methods */
(destructor)PyCursesPanel_Dealloc, /*tp_dealloc*/
0, /*tp_print*/
- (getattrfunc)PyCursesPanel_GetAttr, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT, /*tp_flags*/
+ 0, /*tp_doc*/
+ 0, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ PyCursesPanel_Methods, /*tp_methods*/
};
/* Wrapper for panel_above(NULL). This function returns the bottom
@@ -470,7 +478,8 @@ PyInit__curses_panel(void)
PyObject *m, *d, *v;
/* Initialize object type */
- Py_TYPE(&PyCursesPanel_Type) = &PyType_Type;
+ if (PyType_Ready(&PyCursesPanel_Type) < 0)
+ return NULL;
import_curses();