Hi Timm,
On Thu, Nov 12, 2020 at 04:04:00PM +0100, Timm Bäder via Elfutils-devel wrote:
> In preparation of getting rid of nested functions
I actually like the nested functions in this case, they simply act as
lambdas. But if you want to get rid of this one then can we inline
the (*memory_callback) (dwfl, segndx, buffer, buffer_available, ...)
call instead of introducing a new top-level function that shuffles the
arguments around?
So instead of:
> - if (segment_read (ndx, &buffer, &buffer_available,
> + if (segment_read (dwfl, memory_callback, memory_callback_arg,
> + ndx, &buffer, &buffer_available,
> start, sizeof (Elf64_Ehdr))
say:
if (! (*memory_callback) (dwfl, ndx, &buffer, &buffer_available,
start, sizeof (Elf64_Ehdr), memory_callback_arg))
Thanks,
Mark