Function typedefs have any use?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In a header file, I want to declare a struct containing method pointers (this is C, not C++). I want to create typedefs for those method pointers, so that when the methods are defined later, their signatures will match (without having to be hand-written to match).

However, in spite of the fact that I can do:

typedef int method_func(int);

I can't see any way to _use_ this typedef, except to declare the method pointer itself. Actual definition of the method has to re-iterate the prototype of the function and ensure that it matches.

Is this sort of thing just not possible in standard C?

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux