python - PyAPI_DATA() 宏的解释?

标签 python c api python-c-api

我在整个网络上搜索过 can't seem to find文档甚至是 PyAPI_DATA() 功能的简单解释(即使它是 used in the Python header filescited on python.org )。任何人都可以解释这是什么或指出我忽略的文档吗?

谢谢。

最佳答案

它用于标记公共(public) API 变量(因为 Python 的核心通常是一个动态库),例如在 Windows 上,它在编译核心时扩展为 extern __declspec(dllexport) RTYPE,在例如编译时扩展为 extern __declspec(dllimport) RTYPE。模块被编译。它在 Include/pyport.h 中定义。

关于python - PyAPI_DATA() 宏的解释?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1655271/

相关文章:

ios - 这个功能对吗?调用带闭包的函数(swift - iOS)

javascript - 谷歌日历 API Node

python - 通过列表引用类实例

python - 使用并行运行 html2text

python - 如何在 python 中对 A-Z 之外的 UTF-8 进行加密?

c - 错误 LNK2019 和 LNK1120 (Visual Studio 2008)

javascript - 传单和 Cloudmade : merging two examples together

python - tensorflow 中的剪切图像

c - Ubuntu 中的 skbuff.h 文件在哪里?

c - 如何将文件映射到/dev/zero