summaryrefslogtreecommitdiffstats
path: root/Modules/xxmodule.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/xxmodule.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/xxmodule.c')
-rw-r--r--Modules/xxmodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/xxmodule.c b/Modules/xxmodule.c
index 34d2354..efa97b4 100644
--- a/Modules/xxmodule.c
+++ b/Modules/xxmodule.c
@@ -63,16 +63,16 @@ static PyMethodDef Xxo_methods[] = {
};
static PyObject *
-Xxo_getattr(XxoObject *self, char *name)
+Xxo_getattro(XxoObject *self, PyObject *name)
{
if (self->x_attr != NULL) {
- PyObject *v = PyDict_GetItemString(self->x_attr, name);
+ PyObject *v = PyDict_GetItem(self->x_attr, name);
if (v != NULL) {
Py_INCREF(v);
return v;
}
}
- return Py_FindMethod(Xxo_methods, (PyObject *)self, name);
+ return PyObject_GenericGetattr((PyObject *)self, name);
}
static int
@@ -104,7 +104,7 @@ static PyTypeObject Xxo_Type = {
/* methods */
(destructor)Xxo_dealloc, /*tp_dealloc*/
0, /*tp_print*/
- (getattrfunc)Xxo_getattr, /*tp_getattr*/
+ (getattrfunc)0, /*tp_getattr*/
(setattrfunc)Xxo_setattr, /*tp_setattr*/
0, /*tp_compare*/
0, /*tp_repr*/
@@ -114,7 +114,7 @@ static PyTypeObject Xxo_Type = {
0, /*tp_hash*/
0, /*tp_call*/
0, /*tp_str*/
- 0, /*tp_getattro*/
+ (getattrofunc)Xxo_getattro, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
Py_TPFLAGS_DEFAULT, /*tp_flags*/
@@ -125,7 +125,7 @@ static PyTypeObject Xxo_Type = {
0, /*tp_weaklistoffset*/
0, /*tp_iter*/
0, /*tp_iternext*/
- 0, /*tp_methods*/
+ Xxo_methods, /*tp_methods*/
0, /*tp_members*/
0, /*tp_getset*/
0, /*tp_base*/