Thread (18 messages) flat view 18 messages, 4 authors, 2016-06-15

OT: typesafe callbacks in C (Re: [WIP PATCH 1/7] Add skeleton RA svnclient)

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:00

Daniel Shahaf wrote:
By the way, a common pitfall is to mis-treat the void *baton argument as
the wrong type of baton.  That is, code of the form

    f(void *baton) {
        foo_baton_t *fb = baton;
    }

instead of

    f(void *baton) {
        bar_baton_t *bb = baton;
    }
Just for kicks, I should mention

  http://ccan.ozlabs.org/info/typesafe_cb.html

which makes code like this cause warnings with gcc.

Maybe some version of Subversion years from now could use it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help