From c918489f06080f732138dee07fba11f7622312a7 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Wed, 15 Jan 2025 23:36:10 +0100 Subject: Update any_log documentation --- test/log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/log.c b/test/log.c index 32e126e..c01ed1c 100644 --- a/test/log.c +++ b/test/log.c @@ -1,4 +1,5 @@ #include +#include //#define ANY_LOG_LOCKING #define ANY_LOG_IMPLEMENT @@ -25,7 +26,7 @@ #define ANY_LOG_VALUE_PTR(stream, key, value) \ do { \ if (value == NULL) fprintf(stream, "\"%s\": none", key); \ - else fprintf(stream, "\"%s\": %p", key, value); \ + else fprintf(stream, "\"%s\": %lu", key, (uintptr_t)value); \ } while (false) #define ANY_LOG_VALUE_DOUBLE(stream, key, value) \ @@ -128,6 +129,7 @@ int main() "p:window", NULL, "f:scale", 1.23, "b:hidden", true, + "p:ptr", malloc(0), "g:pairs", ANY_LOG_FORMATTER(pairs_format), pairs, "appname", "nice app"); -- cgit v1.2.3