Re: [PATCH] Use macro HANDLER_WRAPPER in sigchain to wrap clean function of sigchain
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.