string-table: Introduce DECLARE_STRING_TABLE_LOOKUP() and friends
Let's introduce these for the following two reasons: - Using them makes sure the parameter names match between declaration and definition (if both use the corresponding macros). - They make sure developers can't forget the _const_ and _pure_ attributes for the declarations. This commit also includes some include sorting fixes
This commit is contained in:
committed by
Yu Watanabe
parent
daff8ea8bb
commit
aec52c1e6e
@@ -150,7 +150,7 @@ static inline int link_queue_request(
|
||||
int manager_process_requests(Manager *manager);
|
||||
int request_call_netlink_async(sd_netlink *nl, sd_netlink_message *m, Request *req);
|
||||
|
||||
const char* request_type_to_string(RequestType t) _const_;
|
||||
DECLARE_STRING_TABLE_LOOKUP_TO_STRING(request_type, RequestType);
|
||||
|
||||
typedef struct RemoveRequest RemoveRequest;
|
||||
typedef int (*remove_request_netlink_handler_t)(sd_netlink *nl, sd_netlink_message *m, RemoveRequest *req);
|
||||
|
||||
Reference in New Issue
Block a user