An enumeration is not a bitfield, use an integer instead

Enums are good for individual bitfield flag names, but combination of
the bits is not a legit value really.
This commit is contained in:
Panu Matilainen 2024-03-15 10:03:26 +02:00
parent d680ad4667
commit 7108c172f4
2 changed files with 7 additions and 4 deletions

View File

@ -34,10 +34,12 @@ typedef enum rpmCompressedMagic_e {
/** \ingroup rpmfileutil
* RPM glob flags, largely modelled after glob(3) flags.
*/
typedef enum rpmglobFlags_e {
enum rpmglobFlags_e {
RPMGLOB_NONE = 0,
RPMGLOB_NOCHECK = (1 << 0), /*!< same as GLOB_NOCHECK */
} rpmglobFlags;
};
typedef rpmFlags rpmglobFlags;
/** \ingroup rpmfileutil
* Calculate a file digest and size.

View File

@ -62,10 +62,11 @@ extern const char * macrofiles;
#define RPMEXPAND_KEEP_QUOTED (1 << 1) /*!< do not remove quotes from expanded macros */
#define RPMEXPAND_HAVE_QUOTED (1 << 2) /*!< expanded macros contain quote characters */
typedef enum rpmMacroFlags_e {
enum rpmMacroFlags_e {
RPMMACRO_DEFAULT = 0,
RPMMACRO_LITERAL = (1 << 0), /*!< do not expand body of macro */
} rpmMacroFlags;
};
typedef rpmFlags rpmMacroFlags;
/** \ingroup rpmmacro
* Print macros to file stream.