Hi Bruno,

Am Fr., 10. Juli 2020 um 20:38 Uhr schrieb Bruno Haible <br...@clisp.org>:

> OK. Then let's take the problem seriously.

If your solution can be implemented portable, that will be the best
solution by far.

For GCC one can use nested functions, but how can
'partial_function_last' be implemented in ISO C?

> I think it's time to solve the problem once and for all. I propose to add
> a module that defines a function 'partial_function_last' such that, when
> you have a function pointer
>
>    int (*cmp3) (void *arg1, void *arg2, void *context)
>
> then
>
>    cmp2 = partial_function_last (cmp3, context);

partial_function_last has to return the address of an existing
function. But this function has no context accept for global (thread
local) variables. How can this function know about 'cmp3'?

Marc

Reply via email to