开发者

How to get Doxygen to parse Function pointer typedefs containing __cdecl?

开发者 https://www.devze.com 2023-02-17 07:55 出处:网络
When using MS C or GNU C where you need to use __cdecl, function pointer prototypes look like: typedef int (__cdecl *funcname_ptr)(void* arg1, const char* arg2);

When using MS C or GNU C where you need to use __cdecl, function pointer prototypes look like:

  • typedef int (__cdecl *funcname_ptr)(void* arg1, const char* arg2);
  • typedef int(__attribute__((cdecl)) *funcname_ptr)(void* arg1, co开发者_C百科nst char* arg2);

It seems that the text prior to *funcname_ptr causes doxygen's parser to fail.

If you have run into this issue, have you found a workaround?


I haven't encountered this problem, but one workaround may be to predefine __cdecl as a macro that evaluates to nothing in the doxygen configuration file using the PREDEFINED option.

0

精彩评论

暂无评论...
验证码 换一张
取 消