[arch-projects] [PATCH] [pyalpm] Remove one usage of alpm_list_getdata()

Dan McGee dan at archlinux.org
Fri Oct 14 09:34:21 EDT 2011


This goes away in 4.1, but it has never been necessary to use as the
alpm_list_t struct is fully public and the data member directly
accessible. This patch is forward and backward compatible and can safely
be applied to the current version.

Signed-off-by: Dan McGee <dan at archlinux.org>
---
 src/util.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/util.c b/src/util.c
index 673cff6..77e3850 100644
--- a/src/util.c
+++ b/src/util.c
@@ -131,7 +131,7 @@ PyObject* alpmlist_to_pylist(alpm_list_t *prt, PyObject* pybuilder(void*))
   }
 
   for(tmp = prt; tmp; tmp = alpm_list_next(tmp)) {
-    stritem = pybuilder(alpm_list_getdata(tmp));
+    stritem = pybuilder(tmp->data);
     if (!stritem) {
       Py_CLEAR(stritem);
       return NULL;
-- 
1.7.7



More information about the arch-projects mailing list