1 #include "typesafe_cb/typesafe_cb.h"
4 void _callback(void (*fn)(void *arg), void *arg);
5 void _callback(void (*fn)(void *arg), void *arg)
10 /* Callback is set up to warn if arg isn't a pointer (since it won't
11 * pass cleanly to _callback's second arg. */
12 #define callback(fn, arg) \
13 _callback(cast_if_type((fn), void (*)(typeof(arg)), void (*)(void *)), \
16 void my_callback(int something);
17 void my_callback(int something)
21 int main(int argc, char *argv[])
24 callback(my_callback, 100);