PebbleOS
Loading...
Searching...
No Matches
Macros

Preprocessor repetition. More...

Macros

#define PBL_LISTIFY(n, F)   PBL_LISTIFY_(n, F)
 Expand to F(0) F(1) ... F(n - 1).
 

Detailed Description

Preprocessor repetition.

Macro Definition Documentation

◆ PBL_LISTIFY

#define PBL_LISTIFY (   n,
  F 
)    PBL_LISTIFY_(n, F)

Expand to F(0) F(1) ... F(n - 1).

#define SLOT(i) {.id = i},
static struct slot s_slots[] = {PBL_LISTIFY(4, SLOT)};
#define PBL_LISTIFY(n, F)
Expand to F(0) F(1) ... F(n - 1).
Definition listify.h:24
Parameters
nCount, a decimal literal or a macro expanding to one, up to 512.
FFunction-like macro taking the index.