On 3/14/21 11:25 PM, Hal Murray via devel wrote:
Can anybody give me a pointer to code that does this? Or steer me in the
right direction, or ...
There is a recursive tangle of struct needs function and function needs struct,
but the function only needs a pointer to the struct so I think that should work.
Personally, I'd probably typedef the struct:
typedef struct _NtpSomething NtpSomething;
struct _NtpSomething
{
void (*some_func) (NtpSomething *);
}
If you want to typedef the function too, something like this should work:
typedef struct _NtpSomething NtpSomething;
typedef void (*NtpSomeFunc)(NtpSomething *);
struct _NtpSomething
{
void (*NtpSomeFunc) (NtpSomething *);
}
--
Richard
_______________________________________________
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel