From c7d332a26ad59772de5f37e855858cab97e26bb4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 14 Dec 2010 17:45:12 -0600 Subject: Reorganize fields in package struct Saves a few bytes due to padding (256 -> 248 bytes), especially on x86_64, so we get the overhead of our new hash field right back. Signed-off-by: Dan McGee --- lib/libalpm/package.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h index d1abb55f..7740d79a 100644 --- a/lib/libalpm/package.h +++ b/lib/libalpm/package.h @@ -95,17 +95,30 @@ struct __pmpkg_t { char *version; char *desc; char *url; - time_t builddate; - time_t installdate; char *packager; char *md5sum; char *arch; + + time_t builddate; + time_t installdate; + off_t size; off_t isize; off_t download_size; + int scriptlet; int epoch; + pmpkgreason_t reason; + pmpkgfrom_t origin; + /* origin == PKG_FROM_FILE, use pkg->origin_data.file + * origin == PKG_FROM_*DB, use pkg->origin_data.db */ + union { + pmdb_t *db; + char *file; + } origin_data; + pmdbinfrq_t infolevel; + alpm_list_t *licenses; alpm_list_t *replaces; alpm_list_t *groups; @@ -118,17 +131,6 @@ struct __pmpkg_t { alpm_list_t *deltas; alpm_list_t *delta_path; alpm_list_t *removes; /* in transaction targets only */ - /* internal */ - pmpkgfrom_t origin; - /* Replaced 'void *data' with this union as follows: - origin == PKG_FROM_FILE, use pkg->origin_data.file - origin == PKG_FROM_*DB, use pkg->origin_data.db - */ - union { - pmdb_t *db; - char *file; - } origin_data; - pmdbinfrq_t infolevel; struct pkg_operations *ops; }; -- cgit v1.2.3-70-g09d2