I’m reading linux kernel code and I encounter something like the following:
typedef void (* gps_location_callback)(GpsLocation* location)
then later it can be used like:
gps_location_callback location_cb;
Can somebody tell me what does that typedef mean? I never saw something like this before..
Thanks!
This is a function pointer. Variables of this type point to a function whose signature is
void (GpsLocation*):Without the typedef you’d have to write: