From 2fb15a5443c6a1461a53309d3d4ace598996d8b2 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Tue, 21 Sep 2010 11:10:14 +0300 Subject: Stop abusing enum typedefs for bitfield types - Enums are fine for defining the bitfield flags, but the bitfield itself is not an enumeration. Add a separate typedef on "rpmFlags" type (presenting a bitfield of flags) for all of these. Compilers hardly care, but the typedefs give a nice visual clue for us humans using these flags far away from ho^H^H definitions. --- lib/rpmpol.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/rpmpol.h') diff --git a/lib/rpmpol.h b/lib/rpmpol.h index ee74a84fc..f5aef28ad 100644 --- a/lib/rpmpol.h +++ b/lib/rpmpol.h @@ -6,14 +6,18 @@ * Structure(s) used for policy sets. */ +#include + #ifdef __cplusplus extern "C" { #endif -typedef enum rpmpolFlags_e { +enum rpmpolFlags_e { RPMPOL_FLAG_NONE = 0, RPMPOL_FLAG_BASE = (1 << 0) -} rpmpolFlags; +}; + +typedef rpmFlags rpmpolFlags; #define RPMPOL_TYPE_DEFAULT "default" -- cgit v1.2.3