Commit 21381636 authored by Petr Viktorin's avatar Petr Viktorin Committed by Victor Stinner

bpo-29179: Document the Py_UNUSED macro (#4341)

Py_UNUSED has a public name, and is used in the wild outside CPython,
but was not documented. Rectify that.

The macro was added in bpo-19976 and referenced in bpo-26179.
parent 0de92859
......@@ -149,6 +149,13 @@ complete listing.
Like ``getenv(s)``, but returns *NULL* if :option:`-E` was passed on the
command line (i.e. if ``Py_IgnoreEnvironmentFlag`` is set).
.. c:macro:: Py_UNUSED(arg)
Use this for unused arguments in a function definition to silence compiler
warnings, e.g. ``PyObject* func(PyObject *Py_UNUSED(ignored))``.
.. versionadded:: 3.4
.. _api-objects:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment