1 #include <ccan/typesafe_cb/typesafe_cb.h>
4 static void _register_callback(void (*cb)(int x, void *arg), void *arg)
8 #define register_callback(cb, arg) \
9 _register_callback(typesafe_cb_preargs(void, void *, (cb), (arg), int), (arg))
11 static void my_callback(int x, char *p)
15 int main(int argc, char *argv[])
19 #if !HAVE_TYPEOF||!HAVE_BUILTIN_CHOOSE_EXPR||!HAVE_BUILTIN_TYPES_COMPATIBLE_P
20 #error "Unfortunately we don't fail if typesafe_cb_cast is a noop."
26 register_callback(my_callback, p);