summaryrefslogtreecommitdiffstats
path: root/src/pacman/conf.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 /src/pacman/conf.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 'src/pacman/conf.h')
-rw-r--r--src/pacman/conf.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index 2ddeadb3..945de7ce 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -37,9 +37,9 @@ typedef struct __colstr_t {
typedef struct __config_repo_t {
char *name;
alpm_list_t *servers;
- alpm_db_usage_t usage;
- alpm_siglevel_t siglevel;
- alpm_siglevel_t siglevel_mask;
+ int usage;
+ int siglevel;
+ int siglevel_mask;
} config_repo_t;
typedef struct __config_t {
@@ -95,14 +95,16 @@ typedef struct __config_t {
unsigned short group;
unsigned short noask;
unsigned int ask;
- alpm_transflag_t flags;
- alpm_siglevel_t siglevel;
- alpm_siglevel_t localfilesiglevel;
- alpm_siglevel_t remotefilesiglevel;
-
- alpm_siglevel_t siglevel_mask;
- alpm_siglevel_t localfilesiglevel_mask;
- alpm_siglevel_t remotefilesiglevel_mask;
+ /* Bitfield of alpm_transflag_t */
+ int flags;
+ /* Bitfields of alpm_siglevel_t */
+ int siglevel;
+ int localfilesiglevel;
+ int remotefilesiglevel;
+
+ int siglevel_mask;
+ int localfilesiglevel_mask;
+ int remotefilesiglevel_mask;
/* conf file options */
/* I Love Candy! */