git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jun 25, 2010, 15:30 UTC
Message-ID
<20100625153031.GA9702@burratino>
In-Reply-To
<alpine.561.2.00.1006251412170.2144@daniel2.local>
Daniel Shahaf wrote:
Show 12 quoted lines
> 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.
Previous: Daniel ShahafNext: Jonathan Nieder
Message 7 of 18 in “[GSoC update] git-remote-svn: Week 8”
  1. Ramkumar RamachandraJun 23, 2010
  2. 1/7 Add skeleton RA svnclientRamkumar Ramachandra, Jun 23, 2010
  3. Jonathan NiederJun 25, 2010
  4. Daniel ShahafJun 25, 2010
  5. Ramkumar RamachandraJun 25, 2010
  6. Daniel ShahafJun 25, 2010
  7. OT: typesafe callbacks in C (Re: [WIP PATCH 1/7] Add skeleton RA svnclient)Jonathan Nieder, Jun 25, 2010
  8. Jonathan NiederJun 25, 2010
  9. Jonathan NiederJun 25, 2010
  10. 2/7 Add stripped dump editorRamkumar Ramachandra, Jun 23, 2010
  11. 3/7 Import dump_node to dump what changed and cleanup whitespaceRamkumar Ramachandra, Jun 23, 2010
  12. Ramkumar RamachandraJun 23, 2010
  13. 4/7 Replace deprecated svn_path_joinRamkumar Ramachandra, Jun 23, 2010
  14. 5/7 Trigger dump_node in change_dir_propRamkumar Ramachandra, Jun 23, 2010
  15. 6/7 Add file_baton and trigger dump_node in change_file_propRamkumar Ramachandra, Jun 23, 2010
  16. 7/7 Dump the text deltaRamkumar Ramachandra, Jun 23, 2010
  17. Ramkumar RamachandraJun 23, 2010
  18. Jonathan NiederJun 25, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.