Skip to content

Commit

Permalink
sys: util: Update implementation of loop macros
Browse files Browse the repository at this point in the history
Recursive macros are more generic but they are very depending for
preprocessor. When they are used extensively they can prolong
compilation even ten times. Replaced them with brute force
implementation for:
- FOR_EACH macros
- GET_N_ARG
- GET_ARGS_LESS_N
- UTIL_LISTIFY
- UTIL_REPEAT

New implementation provides same functionality but it is limited to 64
input arguments. This is not a hard limitation and can be increased
in the future.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
  • Loading branch information
nordic-krch authored and carlescufi committed Feb 23, 2021
1 parent 1ff7a84 commit de84575
Show file tree
Hide file tree
Showing 3 changed files with 2,126 additions and 664 deletions.
Loading

0 comments on commit de84575

Please sign in to comment.