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
@@ -3,12 +3,10 @@
|
||||
|
||||
#include "basic-forward.h"
|
||||
|
||||
int log_facility_unshifted_to_string_alloc(int i, char **ret);
|
||||
int log_facility_unshifted_from_string(const char *s);
|
||||
DECLARE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_facility_unshifted, int);
|
||||
bool log_facility_unshifted_is_valid(int faciliy);
|
||||
|
||||
int log_level_to_string_alloc(int i, char **ret);
|
||||
int log_level_from_string(const char *s);
|
||||
DECLARE_STRING_TABLE_LOOKUP_WITH_FALLBACK(log_level, int);
|
||||
bool log_level_is_valid(int level);
|
||||
|
||||
int syslog_parse_priority(const char **p, int *priority, bool with_facility);
|
||||
|
||||
Reference in New Issue
Block a user