Remove limitation of M_AS_STR to be called within a M_APPLY

This commit is contained in:
Patrick Pelissier committed 2021-02-06 22:22:50 +01:00
1 parent e4dc06a0e2
commit 07eb5697ab
4 files changed
+11 -11

No files matched your search

+3 -3
View File
@@ -1042,9 +1042,9 @@ M_BEGIN_PROTECTED_CODE
#define M_COMMA_P(...) M_RETI_ARG76(__VA_ARGS__, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, useless)
#endif
/* Return the string representation of the evaluated x.
NOTE: Need to be used with M_APPLY to defer the evaluation */
#define M_AS_STR(x) #x
/* Return the string representation of the evaluated x. */
#define M_AS_STR(x) M_AS_STRI(x)
#define M_AS_STRI(x) #x
/* Return 1 if the argument is empty (aka ''), 0 otherwise.
Handle: EMPTY_P(), EMPTY_P(x), EMPTY_P(()) and EMPTY_P(,) and EMPTY_P(f) with #define f() 2,3 */