1 #include <ccan/typesafe_cb/typesafe_cb.h>
4 static void _register_callback(void (*cb)(void *arg, int x), void *arg)
9 #define register_callback(cb, arg) \
10 _register_callback(typesafe_cb_postargs(void, void *, (cb), (arg), int), (arg))
12 static void my_callback(char *p, int x)
22 #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
23 #error "Unfortunately we don't fail if typesafe_cb_cast is a noop."
29 register_callback(my_callback, p);