[pacman-dev] CVS update of pacman-lib/lib/libalpm (db.c db.h server.h)
Date: Wednesday, February 28, 2007 @ 22:08:41 Author: dan Path: /home/cvs-pacman/pacman-lib/lib/libalpm Modified: db.c (1.62 -> 1.63) db.h (1.26 -> 1.27) server.h (1.10 -> 1.11) * Fix up _alpm_db_free, remove use of void*. ----------+ db.c | 6 ++---- db.h | 2 +- server.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) Index: pacman-lib/lib/libalpm/db.c diff -u pacman-lib/lib/libalpm/db.c:1.62 pacman-lib/lib/libalpm/db.c:1.63 --- pacman-lib/lib/libalpm/db.c:1.62 Mon Feb 26 18:32:08 2007 +++ pacman-lib/lib/libalpm/db.c Wed Feb 28 22:08:41 2007 @@ -78,13 +78,11 @@ return(db); } -void _alpm_db_free(void *data) +void _alpm_db_free(pmdb_t *db) { - pmdb_t *db = data; - ALPM_LOG_FUNC; - FREELISTSERVERS(db->servers); + _FREELIST(db->servers, _alpm_server_free); FREE(db->path); FREE(db); Index: pacman-lib/lib/libalpm/db.h diff -u pacman-lib/lib/libalpm/db.h:1.26 pacman-lib/lib/libalpm/db.h:1.27 --- pacman-lib/lib/libalpm/db.h:1.26 Mon Feb 26 03:38:48 2007 +++ pacman-lib/lib/libalpm/db.h Wed Feb 28 22:08:41 2007 @@ -48,7 +48,7 @@ /* db.c, database general calls */ pmdb_t *_alpm_db_new(const char *root, const char *dbpath, const char *treename); -void _alpm_db_free(void *data); +void _alpm_db_free(pmdb_t *db); int _alpm_db_cmp(const void *db1, const void *db2); alpm_list_t *_alpm_db_search(pmdb_t *db, alpm_list_t *needles); pmdb_t *_alpm_db_register(const char *treename, alpm_cb_db_register callback); Index: pacman-lib/lib/libalpm/server.h diff -u pacman-lib/lib/libalpm/server.h:1.10 pacman-lib/lib/libalpm/server.h:1.11 --- pacman-lib/lib/libalpm/server.h:1.10 Fri Feb 9 05:10:49 2007 +++ pacman-lib/lib/libalpm/server.h Wed Feb 28 22:08:41 2007 @@ -28,7 +28,6 @@ #include <download.h> #define FREESERVER(p) do { if(p){_alpm_server_free(p); p = NULL;}} while(0) -#define FREELISTSERVERS(p) _FREELIST(p, _alpm_server_free) /* Servers */ struct __pmserver_t {
participants (1)
-
Dan McGee