开发者

Explanation of PyAPI_DATA() macro?

开发者 https://www.devze.com 2022-12-10 02:58 出处:网络
I\'ve searched all over the web and can\'t seem to find documentation or even a simple explanation of what PyAPI_DATA() does (even though it is used in the Python header files and cited on python.o开发

I've searched all over the web and can't seem to find documentation or even a simple explanation of what PyAPI_DATA() does (even though it is used in the Python header files and cited on python.o开发者_如何学运维rg). Could anyone care to explain what this is or point me to documentation I am overlooking?

Thanks.


It's used to mark public API variables (as Python's core is usually a dynamic library), e.g. on Windows, it's expanded to extern __declspec(dllexport) RTYPE when core is compiled and to extern __declspec(dllimport) RTYPE when e.g. modules are compiled. It's defined in Include/pyport.h.

0

精彩评论

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