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

Re: [PATCH] Use macro HANDLER_WRAPPER in sigchain to wrap clean function of sigchain

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 13, 2012, 21:17 UTC
Message-ID
<7vlin4td4g.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120313205501.GB27436@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> So I don't like boilerplate or repetition, but this may be one of those
> times where it is simply more clear to just be verbose.
Yes, I agree with you 100% re: these particular repetitions.
Show 10 quoted lines
>> *1* Yes, I know, this casts between a data pointer and a function pointer
>> that is not portable, but the purpose of this pseudo-code is primarily to
>> illustrate the high level view of the idea.  We would probably want to be
>> able to pass callback value to the clean_foo() function and at that point,
>> we would likely to be passing a pointer to a struct, and we could declare
>> the first element of such a struct is a pointer to a sigchain_fn, or
>> something.
>
> That is the correct way to do it, but where does the struct memory come
> from?
Probably somewhere near "struct sigchain_signal" are kept.
Previous: Jeff KingNext: 徐迪
Message 4 of 5 in “Use macro HANDLER_WRAPPER in sigchain to wrap clean function of sigchain”
  1. Use macro HANDLER_WRAPPER in sigchain to wrap clean function of sigchain徐迪, Mar 13, 2012
  2. Junio C HamanoMar 13, 2012
  3. Jeff KingMar 13, 2012
  4. Junio C HamanoMar 13, 2012
  5. 徐迪Mar 15, 2012

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.