]> git.ozlabs.org Git - ccan/blobdiff - ccan/typesafe_cb/test/compile_ok-typesafe_cb-NULL.c
tdb2: suppress failtest more than once on mmap.
[ccan] / ccan / typesafe_cb / test / compile_ok-typesafe_cb-NULL.c
index e3dceb245eefb56541d5b03db8f7c816d2b087d0..265de8b14ee5a75761b4e6922aa7d30b04145f44 100644 (file)
@@ -1,21 +1,17 @@
 #include <ccan/typesafe_cb/typesafe_cb.h>
 #include <stdlib.h>
 
-/* NULL args for callback function should be OK for _exact and _def. */
+/* NULL args for callback function should be OK for normal and _def. */
 
-static void _register_callback(void (*cb)(void *arg), void *arg)
+static void _register_callback(void (*cb)(const void *arg), const void *arg)
 {
 }
 
-#define register_callback_def(cb, arg)                         \
-       _register_callback(typesafe_cb_def(void, (cb), (arg)), (arg))
-
-#define register_callback_exact(cb, arg)                               \
-       _register_callback(typesafe_cb_exact(void, (cb), (arg)), (arg))
+#define register_callback(cb, arg)                             \
+       _register_callback(typesafe_cb(void, const void *, (cb), (arg)), (arg))
 
 int main(int argc, char *argv[])
 {
-       register_callback_def(NULL, "hello world");
-       register_callback_exact(NULL, "hello world");
+       register_callback(NULL, "hello world");
        return 0;
 }