Skip to content

Generalize checkasm_check_func() to arbitrary uintptr_t key

There is technically no reason why checkasm_check_func() should accept only function pointers; the versions can be distinguished by any arbitrary key value. The one special semantic that remains is treating 0 as "no such function", but this is not too unreasonable as long as it's documented.

Opens up the way towards e.g. testing generated functions whose pointer values are not stable, but which can be identified by some other key property.

I decided to also rename it to checkasm_check_key() to make this variant more clearly distinguished from check_func() in case users want to use it directly.

Merge request reports

Loading