@@ -182,6 +182,14 @@ complete listing.
182182 Equivalent to :c:macro: `Py_LOCAL ` but additionally requests the function
183183 be inlined.
184184
185+ .. c :macro :: Py_LOCAL_SYMBOL
186+
187+ Macro used to declare a symbol as local to the shared library (hidden).
188+ On supported platforms, it ensures the symbol is not exported.
189+
190+ On compatible versions of GCC/Clang, it
191+ expands to ``__attribute__((visibility("hidden"))) ``.
192+
185193.. c :macro :: Py_MAX(x, y)
186194
187195 Return the maximum value between ``x `` and ``y ``.
@@ -336,6 +344,38 @@ complete listing.
336344 sizeof(array) / sizeof((array)[0])
337345
338346
347+ .. c :macro :: Py_EXPORTED_SYMBOL
348+
349+ Macro used to declare a symbol (function or data) as exported.
350+ On Windows, this expands to ``__declspec(dllexport) ``.
351+ On compatible versions of GCC/Clang, it
352+ expands to ``__attribute__((visibility("default"))) ``.
353+ This macro is for defining the C API itself; extension modules should not use it.
354+
355+
356+ .. c :macro :: Py_IMPORTED_SYMBOL
357+
358+ Macro used to declare a symbol as imported.
359+ On Windows, this expands to ``__declspec(dllimport) ``.
360+ This macro is for defining the C API itself; extension modules should not use it.
361+
362+
363+ .. c :macro :: PyAPI_FUNC(type)
364+
365+ Macro used by CPython to declare a function as part of the C API.
366+ Its expansion depends on the platform and build configuration.
367+ This macro is intended for defining CPython's C API itself;
368+ extension modules should not use it for their own symbols.
369+
370+
371+ .. c :macro :: PyAPI_DATA(type)
372+
373+ Macro used by CPython to declare a public global variable as part of the C API.
374+ Its expansion depends on the platform and build configuration.
375+ This macro is intended for defining CPython's C API itself;
376+ extension modules should not use it for their own symbols.
377+
378+
339379.. _api-objects :
340380
341381Objects, Types and Reference Counts
0 commit comments