diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-03-29 22:31:03 +0200 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-03-29 22:31:03 +0200 |
commit | 95ea99e1973c03abe73b7c20ded9a24905420291 (patch) | |
tree | 32c7887786916842bf8e9f2dd93b8cd03c44f5d0 /lib/libalpm/alpm.c | |
parent | e5389ddc620bb4584a29c8e36ea1d2584f013f7f (diff) | |
download | pacman-95ea99e1973c03abe73b7c20ded9a24905420291.tar.gz pacman-95ea99e1973c03abe73b7c20ded9a24905420291.tar.xz |
Turned pmdepmissing_t into an opaque structure
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r-- | lib/libalpm/alpm.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index da879569..e4000911 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -565,6 +565,31 @@ int alpm_trans_release() } /* + * Dependencies + */ + +void *alpm_dep_getinfo(pmdepmissing_t *miss, unsigned char parm) +{ + void *data; + + /* Sanity checks */ + ASSERT(miss != NULL, return(NULL)); + + switch(parm) { + case PM_DEP_TARGET: data = (void *)(int)miss->target; break; + case PM_DEP_TYPE: data = (void *)(int)miss->type; break; + case PM_DEP_MOD: data = (void *)(int)miss->depend.mod; break; + case PM_DEP_NAME: data = miss->depend.name; break; + case PM_DEP_VERSION: data = miss->depend.version; break; + default: + data = NULL; + break; + } + + return(data); +} + +/* * Log facilities */ |