git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	David Michael Barr <david.barr@cordelta.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: OT: typesafe callbacks in C (Re: [WIP PATCH 1/7] Add skeleton RA svnclient)
Date: Fri, 25 Jun 2010 10:30:32 -0500	[thread overview]
Message-ID: <20100625153031.GA9702@burratino> (raw)
In-Reply-To: <alpine.561.2.00.1006251412170.2144@daniel2.local>

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.

  reply	other threads:[~2010-06-25 15:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23 16:22 [GSoC update] git-remote-svn: Week 8 Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 1/7] Add skeleton RA svnclient Ramkumar Ramachandra
2010-06-25  0:14   ` Jonathan Nieder
2010-06-25  9:07     ` Daniel Shahaf
2010-06-25 11:07       ` Ramkumar Ramachandra
2010-06-25 11:30         ` Daniel Shahaf
2010-06-25 15:30           ` Jonathan Nieder [this message]
2010-06-25 14:45         ` Jonathan Nieder
2010-06-25 13:34       ` Jonathan Nieder
2010-06-23 16:22 ` [WIP PATCH 2/7] Add stripped dump editor Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 3/7] Import dump_node to dump what changed and cleanup whitespace Ramkumar Ramachandra
2010-06-23 17:05   ` Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 4/7] Replace deprecated svn_path_join Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 5/7] Trigger dump_node in change_dir_prop Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 6/7] Add file_baton and trigger dump_node in change_file_prop Ramkumar Ramachandra
2010-06-23 16:22 ` [WIP PATCH 7/7] Dump the text delta Ramkumar Ramachandra
2010-06-23 17:18 ` [GSoC update] git-remote-svn: Week 8 Ramkumar Ramachandra
2010-06-25  0:42   ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100625153031.GA9702@burratino \
    --to=jrnieder@gmail.com \
    --cc=artagnon@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=david.barr@cordelta.com \
    --cc=git@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=srabbelier@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).