OK, thanks.
I don't think the template function is necessary but it's not so important. I would have just made a lookup table:
typedef void (*FunPtr)(); static const struct { char const* name; FunPtr* ptr; } fun[] = { {"libinput_event_touch_get_major_transformed", (FunPtr*)&get_touch_major}, ... };
And then loop through the array, indirectly filling out the pointed-to function pointers.
« Back to merge proposal
OK, thanks.
I don't think the template function is necessary but it's not so important. I would have just made a lookup table:
typedef void (*FunPtr)(); event_touch_ get_major_ transformed" , (FunPtr* )&get_touch_ major},
static const struct
{
char const* name;
FunPtr* ptr;
} fun[] =
{
{"libinput_
...
};
And then loop through the array, indirectly filling out the pointed-to function pointers.