1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-13 00:09:51 +02:00

gpg: Use enums instead of defines.

* g10/keydb.h (PK_LIST_ENCRYPT_TO): Change from a macro to an enum.
(PK_LIST_HIDDEN): Likewise.
(PK_LIST_CONFIG): Likewise.
(PK_LIST_SHIFT): Likewise.n

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>

Using an enum has the advantage that the symbol can be used in gdb.
This commit is contained in:
Neal H. Walfield 2015-12-17 10:36:27 +01:00
parent d8392299f3
commit ee8a8ec1cf

View File

@ -70,12 +70,18 @@ enum resource_type {
/* Bit flags used with build_pk_list. */ /* Bit flags used with build_pk_list. */
#define PK_LIST_ENCRYPT_TO 1 /* This is an encrypt-to recipient. */ enum
#define PK_LIST_HIDDEN 2 /* This is a hidden recipient. */ {
#define PK_LIST_CONFIG 4 /* Specified via config file. */ PK_LIST_ENCRYPT_TO=1, /* This is an encrypt-to recipient. */
PK_LIST_HIDDEN=2, /* This is a hidden recipient. */
PK_LIST_CONFIG=4 /* Specified via config file. */
};
/* To store private data in the flags they must be left shifted by /* To store private data in the flags they must be left shifted by
this value. */ this value. */
#define PK_LIST_SHIFT 3 enum
{
PK_LIST_SHIFT=3
};
/**************** /****************
* A data structure to hold information about the external position * A data structure to hold information about the external position