diff options
author | Dan McGee <dan@archlinux.org> | 2011-06-16 18:55:26 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-06-16 18:58:04 +0200 |
commit | 25b7df4dab61e908a0f86e3aad51f1f5c9ed2ccb (patch) | |
tree | 805ef5081dbd23ac4de7ca154d89c25d2068efe3 /lib/libalpm | |
parent | 51359e6d33cf2f3f3acf95ad526c5b22e39d86cf (diff) | |
download | pacman-25b7df4dab61e908a0f86e3aad51f1f5c9ed2ccb.tar.gz pacman-25b7df4dab61e908a0f86e3aad51f1f5c9ed2ccb.tar.xz |
Make pmgrp_t public
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/alpm.h | 12 | ||||
-rw-r--r-- | lib/libalpm/group.c | 12 | ||||
-rw-r--r-- | lib/libalpm/group.h | 7 | ||||
-rw-r--r-- | lib/libalpm/sync.c | 2 |
4 files changed, 10 insertions, 23 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 17194f0d..d1faf7fe 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -103,7 +103,6 @@ typedef enum _pgp_verify_t { typedef struct __pmhandle_t pmhandle_t; typedef struct __pmdb_t pmdb_t; typedef struct __pmpkg_t pmpkg_t; -typedef struct __pmgrp_t pmgrp_t; typedef struct __pmtrans_t pmtrans_t; /** Dependency */ @@ -137,6 +136,14 @@ typedef struct _pmfileconflict_t { char *ctarget; } pmfileconflict_t; +/** Package group */ +typedef struct _pmgrp_t { + /** group name */ + char *name; + /** list of pmpkg_t packages */ + alpm_list_t *packages; +} pmgrp_t; + /** Package upgrade delta */ typedef struct _pmdelta_t { /** filename of the delta patch */ @@ -684,8 +691,7 @@ int alpm_db_set_pgp_verify(pmdb_t *db, pgp_verify_t verify); /* * Groups */ -const char *alpm_grp_get_name(const pmgrp_t *grp); -alpm_list_t *alpm_grp_get_pkgs(const pmgrp_t *grp); + alpm_list_t *alpm_find_grp_pkgs(alpm_list_t *dbs, const char *name); /* diff --git a/lib/libalpm/group.c b/lib/libalpm/group.c index 13a216ee..07acfa89 100644 --- a/lib/libalpm/group.c +++ b/lib/libalpm/group.c @@ -52,16 +52,4 @@ void _alpm_grp_free(pmgrp_t *grp) FREE(grp); } -const char SYMEXPORT *alpm_grp_get_name(const pmgrp_t *grp) -{ - ASSERT(grp != NULL, return NULL); - return grp->name; -} - -alpm_list_t SYMEXPORT *alpm_grp_get_pkgs(const pmgrp_t *grp) -{ - ASSERT(grp != NULL, return NULL); - return grp->packages; -} - /* vim: set ts=2 sw=2 noet: */ diff --git a/lib/libalpm/group.h b/lib/libalpm/group.h index c92684e3..f2a67ca9 100644 --- a/lib/libalpm/group.h +++ b/lib/libalpm/group.h @@ -22,13 +22,6 @@ #include "alpm.h" -struct __pmgrp_t { - /** group name */ - char *name; - /** list of pmpkg_t packages */ - alpm_list_t *packages; -}; - pmgrp_t *_alpm_grp_new(const char *name); void _alpm_grp_free(pmgrp_t *grp); diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 6b3ddfe8..15f135ba 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -225,7 +225,7 @@ alpm_list_t SYMEXPORT *alpm_find_grp_pkgs(alpm_list_t *dbs, if(!grp) continue; - for(j = alpm_grp_get_pkgs(grp); j; j = j->next) { + for(j = grp->packages; j; j = j->next) { pmpkg_t *pkg = j->data; if(_alpm_pkg_find(ignorelist, alpm_pkg_get_name(pkg))) { |