P99
|
◆ P99_MAC_ARGS
Value:
P99_FOR(, P99_NARG(__VA_ARGS__), P00_SEP, P00_MAC_ARGS_REAL1, __VA_ARGS__)
Declare macro parameters as local variables as if the macro were declared as a type generic
This receives parenthesized pairs of name and value that are to be promoted as local variables inside a macro expansion. Use this as follows: #define atomic_fetch_add_conditional(OBJP, OPERAND) \
({ \
P99_MAC_ARGS((p00_objp, OBJP), (p00_op, OPERAND)); \
... \
})
This achieves several objectives
This is done by evaluating all macro arguments first, as it would be for a function call, and then assigning it to fresh variables.
|