summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-07-02 22:38:47 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-07-02 22:38:47 (GMT)
commit1f900f1f69c93e409595f34a6da9e2b10e331421 (patch)
treecc8c26434cbfcac1bb6c80773bf124b3639e2ab5 /Modules/_cursesmodule.c
parent7c265a19433644fafcb8eca56633a83307f69739 (diff)
downloadcpython-1f900f1f69c93e409595f34a6da9e2b10e331421.zip
cpython-1f900f1f69c93e409595f34a6da9e2b10e331421.tar.gz
cpython-1f900f1f69c93e409595f34a6da9e2b10e331421.tar.bz2
#3247: get rid of Py_FindMethod
Third step: unix-only modules. Really remove the function this time.
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 210cb42..4f99da5 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -1650,12 +1650,6 @@ static PyMethodDef PyCursesWindow_Methods[] = {
{NULL, NULL} /* sentinel */
};
-static PyObject *
-PyCursesWindow_GetAttr(PyCursesWindowObject *self, char *name)
-{
- return Py_FindMethod(PyCursesWindow_Methods, (PyObject *)self, name);
-}
-
/* -------------------------------------------------------*/
PyTypeObject PyCursesWindow_Type = {
@@ -1666,14 +1660,28 @@ PyTypeObject PyCursesWindow_Type = {
/* methods */
(destructor)PyCursesWindow_Dealloc, /*tp_dealloc*/
0, /*tp_print*/
- (getattrfunc)PyCursesWindow_GetAttr, /*tp_getattr*/
- (setattrfunc)0, /*tp_setattr*/
+ (getattrfunc)0, /*tp_getattr*/
+ (setattrfunc)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*/
+ PyCursesWindow_Methods, /*tp_methods*/
};
/*********************************************************************
@@ -2792,7 +2800,8 @@ PyInit__curses(void)
static void *PyCurses_API[PyCurses_API_pointers];
/* Initialize object type */
- Py_TYPE(&PyCursesWindow_Type) = &PyType_Type;
+ if (PyType_Ready(&PyCursesWindow_Type) < 0)
+ return NULL;
/* Initialize the C API pointer array */
PyCurses_API[0] = (void *)&PyCursesWindow_Type;