From 6b361e0d0c0a4fcc3ca743f22fd28e7cf7798615 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 19 Jun 2021 22:52:25 +0200 Subject: [PATCH] Add use of M_PRINT in C11 mode. --- example/ex-string03.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/ex-string03.c b/example/ex-string03.c index b86ac876..12aeaa5f 100644 --- a/example/ex-string03.c +++ b/example/ex-string03.c @@ -33,7 +33,11 @@ int main(void) // Print the count: for M_EACH(p, map, dict_str_t) { +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) + M_PRINT(p->value, " occurences of ", p->key, "\n"); +#else printf ("%zu occurences of %s\n", p->value, string_get_cstr(p->key)); +#endif } } }