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

Re: [RFC 2/2] Future Proofing: Pass around pointers to either functions or data

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Mar 30, 2011, 10:09 UTC
Message-ID
<AANLkTi=nxA0BrLruQ9zc_SajH2ghpZX14Ra7QOo9fMBx@mail.gmail.com>
In-Reply-To
<522d5a8a-a674-40bd-91bf-b5b8f88e0f78-mfwitten@gmail.com>
On Tue, Mar 29, 2011 at 5:28 PM, Michael Witten <mfwitten@gmail.com> wrote:
Show 8 quoted lines
> +#define ALT_ODB_FN_INFO_FUNC(variable, function) \
> +       union alt_odb_fn_info variable = { \
> +               .func = (alt_odb_fn_cb)function \
> +       }
> +#define ALT_ODB_FN_INFO_DATA(variable, data_) \
> +       union alt_odb_fn_info variable = { \
> +               .data = data_ \
> +       }

We try to stay away from C99 features like this, as it doesn't work on all compilers we target.

Previous: Michael WittenNext: Michael Witten
Message 3 of 12 in “[RFC 1/2] Portability: Convert strictly between function pointers”
  1. Michael WittenMar 29, 2011
  2. 2/2 Future Proofing: Pass around pointers to either functions or dataMichael Witten, Mar 29, 2011
  3. Erik Faye-LundMar 30, 2011
  4. Michael WittenMar 30, 2011
  5. Junio C HamanoMar 30, 2011
  6. 1/3 Alternates API: Untangle the interfaceMichael Witten, Mar 30, 2011
  7. Junio C HamanoMar 30, 2011
  8. 2/3 Alternates API: Improve namingMichael Witten, Mar 30, 2011
  9. Junio C HamanoMar 30, 2011
  10. 3/3 Alternates API: Remove unused parameterMichael Witten, Mar 30, 2011
  11. 0/3 Alternates APIMichael Witten, Mar 30, 2011
  12. Junio C HamanoMar 30, 2011

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.