diff Modules/_dbmmodule.c @ 48418:aa1fbe321acf

#3247: get rid of Py_FindMethod Third step: unix-only modules. Really remove the function this time.
author Amaury Forgeot d'Arc <amauryfa@gmail.com>
date Wed, 02 Jul 2008 22:38:47 +0000
parents 94f64f11fdd0
children 8ffec372040e
line wrap: on
line diff
--- a/Modules/_dbmmodule.c	Wed Jul 02 22:07:22 2008 +0000
+++ b/Modules/_dbmmodule.c	Wed Jul 02 22:38:47 2008 +0000
@@ -324,12 +324,6 @@
 	{NULL,		NULL}		/* sentinel */
 };
 
-static PyObject *
-dbm_getattr(dbmobject *dp, char *name)
-{
-	return Py_FindMethod(dbm_methods, (PyObject *)dp, name);
-}
-
 static PyTypeObject Dbmtype = {
 	PyVarObject_HEAD_INIT(NULL, 0)
 	"_dbm.dbm",
@@ -337,7 +331,7 @@
 	0,
 	(destructor)dbm_dealloc,  /*tp_dealloc*/
 	0,			  /*tp_print*/
-	(getattrfunc)dbm_getattr, /*tp_getattr*/
+	0,                        /*tp_getattr*/
 	0,			  /*tp_setattr*/
 	0,			  /*tp_compare*/
 	0,			  /*tp_repr*/
@@ -350,7 +344,15 @@
 	0,                    /*tp_getattro*/
 	0,                    /*tp_setattro*/
 	0,                    /*tp_as_buffer*/
-	Py_TPFLAGS_DEFAULT,   /*tp_xxx4*/
+	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*/
+	dbm_methods,          /*tp_methods*/
 };
 
 /* ----------------------------------------------------------------- */