1 #include <ccan/typesafe_cb/typesafe_cb.h>
4 /* NULL args for callback function should be OK for _exact and _def. */
6 static void _register_callback(void (*cb)(void *arg), void *arg)
10 #define register_callback_def(cb, arg) \
11 _register_callback(typesafe_cb_def(void, (cb), (arg)), (arg))
13 #define register_callback_exact(cb, arg) \
14 _register_callback(typesafe_cb_exact(void, (cb), (arg)), (arg))
16 int main(int argc, char *argv[])
18 register_callback_def(NULL, "hello world");
19 register_callback_exact(NULL, "hello world");