diff options
author | Dan McGee <dan@archlinux.org> | 2007-08-14 10:14:35 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-08-14 10:14:35 -0400 |
commit | a65ad4efc1102449a087b464d3b8d4670a614b99 (patch) | |
tree | 3131b4392641667c5d289d87eaccca976244aee1 /lib/libalpm/cache.c | |
parent | 49c29e16b31ce35e81be210bc74a3834530bb9e0 (diff) | |
download | pacman-a65ad4efc1102449a087b464d3b8d4670a614b99.tar.xz |
package.h: implement origin_data union in pmpkg_t struct
We were using a void *data element in pmpkg_t before, which is unsafe by its
nature of being untyped. Reimplement data as origin_data being a union that
can hold either a path to a package file or a pointer to a cache database,
and make the other necesary updates in the code to reflect this. See package.h
for details.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/cache.c')
-rw-r--r-- | lib/libalpm/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libalpm/cache.c b/lib/libalpm/cache.c index 5afff6cc..01abb96c 100644 --- a/lib/libalpm/cache.c +++ b/lib/libalpm/cache.c @@ -62,7 +62,7 @@ int _alpm_db_load_pkgcache(pmdb_t *db) _alpm_log(PM_LOG_FUNCTION, _("adding '%s' to package cache for db '%s'"), alpm_pkg_get_name(info), db->treename); info->origin = PKG_FROM_CACHE; - info->data = db; + info->origin_data.db = db; /* add to the collection */ db->pkgcache = alpm_list_add(db->pkgcache, info); count++; |