mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Rename struct pubkey to pukey_s and add pubkey_t.
* g10/keydb.h (struct pubkey): Rename to pubkey_s. (pubkey_t): New. Change all struct pubkey_s to use this type. * g10/getkey.c (get_pubkeys): Rename arg keys to r_keys. -- It is common in GnuPG to use a suffix of _s for struct names. There is no technical need for this (actually this pattern comes from pre ANSI C compilers which had no separate namespaces) but it avoid surprises when reading the code. Adding the pubkey_t type is mainly to improve font locking by using the common suffix _t for a typedefed type. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
363ed2e892
commit
a9cbdcfd9c
2 changed files with 17 additions and 16 deletions
11
g10/keydb.h
11
g10/keydb.h
|
@ -486,19 +486,20 @@ int get_pubkey_fast ( PKT_public_key *pk, u32 *keyid );
|
|||
KBNODE get_pubkeyblock( u32 *keyid );
|
||||
|
||||
/* A list used by get_pubkeys to gather all of the matches. */
|
||||
struct pubkey
|
||||
struct pubkey_s
|
||||
{
|
||||
struct pubkey *next;
|
||||
struct pubkey_s *next;
|
||||
/* The key to use (either the public key or the subkey). */
|
||||
PKT_public_key *pk;
|
||||
kbnode_t keyblock;
|
||||
};
|
||||
typedef struct pubkey_s *pubkey_t;
|
||||
|
||||
/* Free a single key. This does not remove key from any list! */
|
||||
void pubkey_free (struct pubkey *key);
|
||||
void pubkey_free (pubkey_t key);
|
||||
|
||||
/* Free a list of public keys. */
|
||||
void pubkeys_free (struct pubkey *keys);
|
||||
void pubkeys_free (pubkey_t keys);
|
||||
|
||||
/* Returns all keys that match the search specfication SEARCH_TERMS.
|
||||
The returned keys should be freed using pubkeys_free. */
|
||||
|
@ -506,7 +507,7 @@ gpg_error_t
|
|||
get_pubkeys (ctrl_t ctrl,
|
||||
char *search_terms, int use, int include_unusable, char *source,
|
||||
int warn_possibly_ambiguous,
|
||||
struct pubkey **keys);
|
||||
pubkey_t *r_keys);
|
||||
|
||||
/* Find a public key identified by the name NAME.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue