typedef void Callback void struct _Closure Callback cb void data Closu

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
typedef void (*Callback)(void *);
struct _Closure
{
Callback cb;
void *data;
} Closure;
void clusure_call(Closure *self)
{
self->cb(self->data);
}