summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.h
diff options
context:
space:
mode:
authorAurelien Foret <aurelien@archlinux.org>2006-02-22 20:49:33 +0000
committerAurelien Foret <aurelien@archlinux.org>2006-02-22 20:49:33 +0000
commit16ff7cfa8ef2d50c97d79357c2b2c1fdc2bc241b (patch)
treed259cc5a0de95d478c3a21df549dbd90880147cd /lib/libalpm/package.h
parent78ffd98701b64bff74fc530db91ffc7e8768989a (diff)
downloadpacman-16ff7cfa8ef2d50c97d79357c2b2c1fdc2bc241b.tar.xz
improved _alpm_list_free handling
Diffstat (limited to 'lib/libalpm/package.h')
-rw-r--r--lib/libalpm/package.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index c22cfe59..2fe60dd7 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -75,20 +75,11 @@ do { \
} \
} while(0)
-#define FREELISTPKGS(p) \
-do { \
- if(p) { \
- PMList *i; \
- for(i = p; i; i = i->next) { \
- FREEPKG(i->data); \
- }\
- FREELIST(p);\
- } \
-} while(0)
+#define FREELISTPKGS(p) _FREELIST(p, _alpm_pkg_free)
pmpkg_t* _alpm_pkg_new(const char *name, const char *version);
pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg);
-void _alpm_pkg_free(pmpkg_t *pkg);
+void _alpm_pkg_free(void *data);
pmpkg_t *_alpm_pkg_load(char *pkgfile);
pmpkg_t *_alpm_pkg_isin(char *needle, PMList *haystack);
int _alpm_pkg_splitname(char *target, char *name, char *version);