Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this function definition mean?

Tags:

c++

c

This function definition is found here. :

static void (*resolve_memcpy (void)) (void)
{
    return my_memcpy; // we'll just always select this routine
}

I don't understand what it means.

like image 785
nakiya Avatar asked Dec 29 '22 06:12

nakiya


1 Answers

resolve_memcpy is a function taking no arguments and returning a pointer to a function taking no arguments and returning void.

EDIT: Here's a link where you can read more about this kind of syntax: http://unixwiz.net/techtips/reading-cdecl.html

like image 183
usta Avatar answered Jan 08 '23 09:01

usta