diff options
author | Ivy Foster <ivy.foster@gmail.com> | 2016-10-12 22:13:32 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2016-10-22 12:50:55 +0200 |
commit | fa06951d90fee028ece95fc7caab39fc7d35d55f (patch) | |
tree | 7bdda990838eb07f2adf5b64b7965c2dcd51cad9 /lib/libalpm/package.h | |
parent | a55adb81d0f6fcd7fe98cc444806b3b0d25efc9c (diff) | |
download | pacman-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/package.h')
-rw-r--r-- | lib/libalpm/package.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h index 114d2250..0822a8d0 100644 --- a/lib/libalpm/package.h +++ b/lib/libalpm/package.h @@ -52,7 +52,7 @@ struct pkg_operations { const char *(*get_arch) (alpm_pkg_t *); off_t (*get_isize) (alpm_pkg_t *); alpm_pkgreason_t (*get_reason) (alpm_pkg_t *); - alpm_pkgvalidation_t (*get_validation) (alpm_pkg_t *); + int (*get_validation) (alpm_pkg_t *); int (*has_scriptlet) (alpm_pkg_t *); alpm_list_t *(*get_licenses) (alpm_pkg_t *); @@ -130,11 +130,14 @@ struct __alpm_pkg_t { char *file; } origin_data; - alpm_dbinfrq_t infolevel; - alpm_pkgvalidation_t validation; alpm_pkgfrom_t origin; alpm_pkgreason_t reason; int scriptlet; + + /* Bitfield from alpm_dbinfrq_t */ + int infolevel; + /* Bitfield from alpm_pkgvalidation_t */ + int validation; }; alpm_file_t *_alpm_file_copy(alpm_file_t *dest, const alpm_file_t *src); @@ -145,8 +148,8 @@ void _alpm_pkg_free(alpm_pkg_t *pkg); void _alpm_pkg_free_trans(alpm_pkg_t *pkg); int _alpm_pkg_validate_internal(alpm_handle_t *handle, - const char *pkgfile, alpm_pkg_t *syncpkg, alpm_siglevel_t level, - alpm_siglist_t **sigdata, alpm_pkgvalidation_t *validation); + const char *pkgfile, alpm_pkg_t *syncpkg, int level, + alpm_siglist_t **sigdata, int *validation); alpm_pkg_t *_alpm_pkg_load_internal(alpm_handle_t *handle, const char *pkgfile, int full); |