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
@@ -7,8 +7,7 @@
|
||||
|
||||
#define _RLIMIT_MAX RLIMIT_NLIMITS
|
||||
|
||||
const char* rlimit_to_string(int i) _const_;
|
||||
int rlimit_from_string(const char *s) _pure_;
|
||||
DECLARE_STRING_TABLE_LOOKUP(rlimit, int);
|
||||
int rlimit_from_string_harder(const char *s) _pure_;
|
||||
void rlimits_list(const char *prefix);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user