This commit is contained in:
hathach
2019-07-12 14:21:34 +07:00
parent e74aa41552
commit 3b6013e78f
2 changed files with 24 additions and 23 deletions

View File

@@ -146,9 +146,10 @@ static inline bool tu_bit_test (uint32_t value, uint8_t n) { return (value &
* Nth position is the same as the number of arguments
* - ##__VA_ARGS__ is used to deal with 0 paramerter (swallows comma)
*------------------------------------------------------------------*/
#ifndef VA_ARGS_NUM_
#ifndef TU_ARGS_NUM
#define TU_ARGS_NUM(...) NARG_(_0, ##__VA_ARGS__,_RSEQ_N())
#define VA_ARGS_NUM_(...) NARG_(_0, ##__VA_ARGS__,_RSEQ_N())
#define NARG_(...) _GET_NTH_ARG(__VA_ARGS__)
#define _GET_NTH_ARG( \
_1, _2, _3, _4, _5, _6, _7, _8, _9,_10, \