cpython/Misc/NEWS.d/next/C API
Miss Islington (bot) f3a689fd9d
[3.12] gh-107249: Implement Py_UNUSED() for MSVC (GH-107250) (#127907)
gh-107249: Implement Py_UNUSED() for MSVC (GH-107250)

Fix warnings C4100 in Py_UNUSED() when Python is built with "cl /W4".

Example with this function included by Python.h:

    static inline unsigned int
    PyUnicode_IS_READY(PyObject* Py_UNUSED(op))
    { return 1; }

Without this change, building a C program with "cl /W4" which just
includes Python.h emits the warning:

    Include\cpython/unicodeobject.h(199):
    warning C4100: '_unused_op': unreferenced formal parameter

This change fix this warning.
(cherry picked from commit 6a43cce32b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-12-13 11:58:47 +00:00
..
2023-07-25-17-23-08.gh-issue-107249.xqk2ke.rst [3.12] gh-107249: Implement Py_UNUSED() for MSVC (GH-107250) (#127907) 2024-12-13 11:58:47 +00:00
README.rst Link to blurb on PyPI in the NEWS.d READMEs. (#3323) 2017-09-05 10:38:05 -07:00

Put news entry `blurb`_ files for the *C API* section in this directory.

.. _blurb: https://pypi.org/project/blurb/