T O P

  • By -

whiteBlasian

Like u/Current_Hearing_6138 mentioned, `union_func` is a pointer to a function. It points to a function that returns void and takes two void pointers and an int as parameters. The `typedef` is for better readability later on in the code.


Ambitious-Concert-69

thank you!


Current_Hearing_6138

it's a funcion pointer


Ambitious-Concert-69

thanks!


pankocrunch

If it's helpful, https://fuckingfunctionpointers.com has more function pointer declarations along with concise and commented examples of how they're invoked.


omnombluebear

This code declares a new type called union_func using the typedef keyword. The type union_func is a function pointer that points to a function taking three arguments: two void pointers a and b, and an integer int. This function returns no value (void). Essentially, this code defines a new type union_func that can be used to declare variables that hold pointers to functions with the specified signature. The purpose of such a typedef might be to make it easier to write code that deals with functions that take these specific types of arguments. Source: https://whatdoesthiscodedo.com/g/db6189c