views:

65

answers:

1

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.org). Could anyone care to explain what this is or point me to documentation I am overlooking?

Thanks.

+2  A: 

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.

PiotrLegnica