sys: util: Deprecate GET_ARG2 macro
GET_ARG_N should be used instead. Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
parent
0afb3445a5
commit
dd9da9c8c4
2 changed files with 7 additions and 4 deletions
|
@ -298,8 +298,8 @@ static inline char *log_strdup(const char *str)
|
|||
#else
|
||||
#define _LOG_LEVEL_RESOLVE(...) \
|
||||
Z_LOG_EVAL(LOG_LEVEL, \
|
||||
(GET_ARG2(__VA_ARGS__, LOG_LEVEL)), \
|
||||
(GET_ARG2(__VA_ARGS__, CONFIG_LOG_DEFAULT_LEVEL)))
|
||||
(GET_ARG_N(2, __VA_ARGS__, LOG_LEVEL)), \
|
||||
(GET_ARG_N(2, __VA_ARGS__, CONFIG_LOG_DEFAULT_LEVEL)))
|
||||
#endif
|
||||
|
||||
/* Return first argument */
|
||||
|
|
|
@ -560,8 +560,11 @@ uint8_t u8_to_dec(char *buf, uint8_t buflen, uint8_t value);
|
|||
*/
|
||||
#define GET_ARG1(...) GET_ARG_N(1, __VA_ARGS__)
|
||||
|
||||
/** @brief Expands to @p arg2 */
|
||||
#define GET_ARG2(arg1, arg2, ...) arg2
|
||||
/** Expands to the second argument.
|
||||
*
|
||||
* @deprecated Use GET_ARG_N instead.
|
||||
*/
|
||||
#define GET_ARG2(...) __DEPRECATED GET_ARG_N(2, __VA_ARGS__)
|
||||
|
||||
/** @brief Expands to all arguments except the first one (@p val) */
|
||||
#define GET_ARGS_LESS_1(val, ...) __VA_ARGS__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue