[英]What is the clang equvivalent this declaration of a function pointer with __stdcall?
I have the following declaration of a function pointer: 我有以下函数指针的声明:
extern long (__stdcall *FooPtr)(int* i);
That is, a function pointer that points to a function to be called with the stdcall calling convention (in VS terms). 也就是说,指向使用stdcall调用约定调用的函数的函数指针(以VS术语)。
How can I translate this declaration so that clang understands it? 如何翻译此声明,以便clang理解它?
__attribute__((stdcall))
is the right answer: clang supports the following list of attributes which, in syntax, are very similar to gcc's ones. 正确的答案是:clang支持以下属性列表,这些属性在语法上与gcc的属性非常相似。
eg 例如
#if defined(__clang__) || defined(__GNUC__)
#define stdCallConv __attribute__ ((stdcall))
#else
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.