summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/db.h
diff options
context:
space:
mode:
authorIvy Foster <ivy.foster@gmail.com>2016-10-12 22:13:32 +0200
committerAllan McRae <allan@archlinux.org>2016-10-22 12:50:55 +0200
commitfa06951d90fee028ece95fc7caab39fc7d35d55f (patch)
tree7bdda990838eb07f2adf5b64b7965c2dcd51cad9 /lib/libalpm/db.h
parenta55adb81d0f6fcd7fe98cc444806b3b0d25efc9c (diff)
downloadpacman-fa06951d90fee028ece95fc7caab39fc7d35d55f.tar.gz
pacman-fa06951d90fee028ece95fc7caab39fc7d35d55f.tar.xz
Represent bitfields as ints, not enums
Many bitfield variables are declared to be enums, because they are generated using bitwise operations on enums such. However, their actual values aren't necessary members of their parent enum, so declaring them 'int' is more accurate. Signed-off-by: Ivy Foster <ivy.foster@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/db.h')
-rw-r--r--lib/libalpm/db.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/libalpm/db.h b/lib/libalpm/db.h
index e6962985..8e50196f 100644
--- a/lib/libalpm/db.h
+++ b/lib/libalpm/db.h
@@ -71,10 +71,14 @@ struct __alpm_db_t {
alpm_list_t *grpcache;
alpm_list_t *servers;
struct db_operations *ops;
- /* flags determining validity, local, loaded caches, etc. */
- enum _alpm_dbstatus_t status;
- alpm_siglevel_t siglevel;
- alpm_db_usage_t usage;
+
+ /* bitfields for validity, local, loaded caches, etc. */
+ /* From _alpm_dbstatus_t */
+ int status;
+ /* alpm_siglevel_t */
+ int siglevel;
+ /* alpm_db_usage_t */
+ int usage;
};
@@ -86,12 +90,12 @@ int _alpm_db_cmp(const void *d1, const void *d2);
alpm_list_t *_alpm_db_search(alpm_db_t *db, const alpm_list_t *needles);
alpm_db_t *_alpm_db_register_local(alpm_handle_t *handle);
alpm_db_t *_alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
- alpm_siglevel_t level);
+ int level);
void _alpm_db_unregister(alpm_db_t *db);
/* be_*.c, backend specific calls */
int _alpm_local_db_prepare(alpm_db_t *db, alpm_pkg_t *info);
-int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq);
+int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, int inforeq);
int _alpm_local_db_remove(alpm_db_t *db, alpm_pkg_t *info);
char *_alpm_local_db_pkgpath(alpm_db_t *db, alpm_pkg_t *info, const char *filename);