[getdns-api] typedefs for structs
Willem Toorop
willem at nlnetlabs.nl
Wed Nov 20 08:30:43 MST 2013
In the current API typedef for structs usage seems inconsistent.
getdns_context_t is defined as pointer type: struct getdns_context_t *
by typedef struct getdns_context_t *getdns_context_t;
But the other structs (getdns_bindata, getdns_dict and getdns_list) just
have an equally named alias for the struct:
typedef struct getdns_bindata getdns_bindata;
typedef struct getdns_dict getdns_dict;
typedef struct getdns_list getdns_list;
Furthermore, those typedefs are not used in the function prototypes at
all whilst the getdns_context_t struct is used *only* by its typedef name.
Is there a reason for this inconsistency?
Personally I would prefer loosing the typedefs and use all struct types
explicitly as structs in the API function prototypes.
What do you think?
More information about the getdns-api
mailing list