@@ -222,6 +222,14 @@ complete listing.
222222 Equivalent to :c:macro: `Py_LOCAL ` but additionally requests the function
223223 be inlined.
224224
225+ .. c :macro :: Py_LOCAL_SYMBOL
226+
227+ Macro used to declare a symbol as local to the shared library (hidden).
228+ On supported platforms, it ensures the symbol is not exported.
229+
230+ On compatible versions of GCC/Clang, it
231+ expands to ``__attribute__((visibility("hidden"))) ``.
232+
225233.. c :macro :: Py_MAX(x, y)
226234
227235 Return the maximum value between ``x `` and ``y ``.
@@ -376,6 +384,38 @@ complete listing.
376384 sizeof(array) / sizeof((array)[0])
377385
378386
387+ .. c :macro :: Py_EXPORTED_SYMBOL
388+
389+ Macro used to declare a symbol (function or data) as exported.
390+ On Windows, this expands to ``__declspec(dllexport) ``.
391+ On compatible versions of GCC/Clang, it
392+ expands to ``__attribute__((visibility("default"))) ``.
393+ This macro is for defining the C API itself; extension modules should not use it.
394+
395+
396+ .. c :macro :: Py_IMPORTED_SYMBOL
397+
398+ Macro used to declare a symbol as imported.
399+ On Windows, this expands to ``__declspec(dllimport) ``.
400+ This macro is for defining the C API itself; extension modules should not use it.
401+
402+
403+ .. c :macro :: PyAPI_FUNC(type)
404+
405+ Macro used by CPython to declare a function as part of the C API.
406+ Its expansion depends on the platform and build configuration.
407+ This macro is intended for defining CPython's C API itself;
408+ extension modules should not use it for their own symbols.
409+
410+
411+ .. c :macro :: PyAPI_DATA(type)
412+
413+ Macro used by CPython to declare a public global variable as part of the C API.
414+ Its expansion depends on the platform and build configuration.
415+ This macro is intended for defining CPython's C API itself;
416+ extension modules should not use it for their own symbols.
417+
418+
379419.. _api-objects :
380420
381421Objects, Types and Reference Counts
0 commit comments