Skip to content

Commit 5d84b69

Browse files
committed
Document Py_GCC_ATTRIBUTE.
1 parent 9785f84 commit 5d84b69

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/c-api/intro.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,14 @@ complete listing.
251251
macros, as macro expansions in *X* are forcefully evaluated by the
252252
preprocessor.
253253

254+
.. c:macro:: Py_GCC_ATTRIBUTE(name)
255+
256+
Use a GCC attribute *name*, hiding it from compilers that don't support GCC
257+
attributes (such as MSVC).
258+
259+
This expands to ``__attribute__((name))`` on a GCC compiler, and expands
260+
to nothing on compilers that don't support GCC attributes.
261+
254262
.. c:macro:: Py_GETENV(s)
255263
256264
Like ``getenv(s)``, but returns ``NULL`` if :option:`-E` was passed on the

0 commit comments

Comments
 (0)