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

Re: "#define precompose_argv(c,v) /* empty */" is evil

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 7, 2020, 06:42 UTC
Message-ID
<xmqqd043hs7w.fsf@gitster.c.googlers.com>
In-Reply-To
<20200807043436.GA21829@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
>> Yes, of course, but as I wrote in my response to Brian, the whole
>> point of using these replacement implementation macros is so that we
>> do not have to sprinkle the main code with such #ifdef/#endif, so
>> I think the code like that is what needs to be corrected ;-)
>
> I'm not sure if I made my point clearly. ...
Sorry, indeed I missed it.  

Using the implementation of precompose_argv() itself as an example, instead of generic looking some_func(), does help to explain why at some point we are bound to have some API calls that are compiled on some platforms and not on others.

Previous: Jeff KingNext: Torsten Bögershausen
Message 9 of 10 in “"#define precompose_argv(c,v) /* empty */" is evil”
  1. Junio C HamanoAug 6, 2020
  2. brian m. carlsonAug 7, 2020
  3. Junio C HamanoAug 7, 2020
  4. brian m. carlsonAug 7, 2020
  5. Junio C HamanoAug 7, 2020
  6. Jeff KingAug 7, 2020
  7. Junio C HamanoAug 7, 2020
  8. Jeff KingAug 7, 2020
  9. Junio C HamanoAug 7, 2020
  10. Torsten BögershausenAug 7, 2020

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.