aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2025-01-15 23:36:10 +0100
committerFederico Angelilli <code@fedang.net>2025-01-15 23:36:10 +0100
commitc918489f06080f732138dee07fba11f7622312a7 (patch)
tree2c28d3fcc1c9a0ca9cf349494b5fbd2cbae81aa0 /test
parentaef37e91f4e6f7781d4f6512ffc4ddc48a687cb5 (diff)
Update any_log documentation
Diffstat (limited to 'test')
-rw-r--r--test/log.c4
1 files changed, 3 insertions, 1 deletions
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 <stdbool.h>
+#include <stdint.h>
//#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");