@@ -194,6 +194,14 @@ complete listing.
194194 Equivalent to :c:macro: `Py_LOCAL ` but additionally requests the function
195195 be inlined.
196196
197+ .. c :macro :: Py_LOCAL_SYMBOL
198+
199+ Macro used to declare a symbol as local to the shared library (hidden).
200+ On supported platforms, it ensures the symbol is not exported.
201+
202+ On compatible versions of GCC/Clang, it
203+ expands to ``__attribute__((visibility("hidden"))) ``.
204+
197205.. c :macro :: Py_MAX(x, y)
198206
199207 Return the maximum value between ``x `` and ``y ``.
@@ -340,6 +348,38 @@ complete listing.
340348 sizeof(array) / sizeof((array)[0])
341349
342350
351+ .. c :macro :: Py_EXPORTED_SYMBOL
352+
353+ Macro used to declare a symbol (function or data) as exported.
354+ On Windows, this expands to ``__declspec(dllexport) ``.
355+ On compatible versions of GCC/Clang, it
356+ expands to ``__attribute__((visibility("default"))) ``.
357+ This macro is for defining the C API itself; extension modules should not use it.
358+
359+
360+ .. c :macro :: Py_IMPORTED_SYMBOL
361+
362+ Macro used to declare a symbol as imported.
363+ On Windows, this expands to ``__declspec(dllimport) ``.
364+ This macro is for defining the C API itself; extension modules should not use it.
365+
366+
367+ .. c :macro :: PyAPI_FUNC(type)
368+
369+ Macro used by CPython to declare a function as part of the C API.
370+ Its expansion depends on the platform and build configuration.
371+ This macro is intended for defining CPython's C API itself;
372+ extension modules should not use it for their own symbols.
373+
374+
375+ .. c :macro :: PyAPI_DATA(type)
376+
377+ Macro used by CPython to declare a public global variable as part of the C API.
378+ Its expansion depends on the platform and build configuration.
379+ This macro is intended for defining CPython's C API itself;
380+ extension modules should not use it for their own symbols.
381+
382+
343383.. _api-objects :
344384
345385Objects, Types and Reference Counts
0 commit comments