From 0793b2cf23667f515c1675e9dbe37e634c4cd730 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 22 Sep 2009 20:20:07 +0300 Subject: All rpm-python iterators are self-iterators, just use PyObject_SelfIter --- python/rpmmi-py.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'python/rpmmi-py.c') diff --git a/python/rpmmi-py.c b/python/rpmmi-py.c index 08b02e840..ea9941f5f 100644 --- a/python/rpmmi-py.c +++ b/python/rpmmi-py.c @@ -73,15 +73,6 @@ struct rpmmiObject_s { rpmdbMatchIterator mi; } ; -/** - */ -static PyObject * -rpmmi_iter(rpmmiObject * s) -{ - Py_INCREF(s); - return (PyObject *)s; -} - /** */ static PyObject * @@ -221,7 +212,7 @@ PyTypeObject rpmmi_Type = { 0, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ - (getiterfunc) rpmmi_iter, /* tp_iter */ + PyObject_SelfIter, /* tp_iter */ (iternextfunc) rpmmi_iternext, /* tp_iternext */ rpmmi_methods, /* tp_methods */ 0, /* tp_members */ -- cgit v1.2.3