summaryrefslogtreecommitdiffstats
path: root/lib/libalpm
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-15 00:45:12 +0100
committerDan McGee <dan@archlinux.org>2010-12-15 00:46:02 +0100
commitc7d332a26ad59772de5f37e855858cab97e26bb4 (patch)
tree1601246cc073ba21f600f0d2346a8eec204f4531 /lib/libalpm
parent919bb6c9e00820c3930067b5985a246a455bef57 (diff)
downloadpacman-c7d332a26ad59772de5f37e855858cab97e26bb4.tar.gz
pacman-c7d332a26ad59772de5f37e855858cab97e26bb4.tar.xz
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 <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/package.h28
1 files 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;
};