From: Jonathan Nieder Date: Fri, 25 Jun 2010 15:30:32 GMT Subject: OT: typesafe callbacks in C (Re: [WIP PATCH 1/7] Add skeleton RA svnclient) Message-ID: <20100625153031.GA9702@burratino> In-Reply-To: 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.