]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-65210: Add const qualifiers in PyArg_VaParseTupleAndKeywords() (GH-105958)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 4 Dec 2023 11:14:56 +0000 (13:14 +0200)
committerGitHub <noreply@github.com>
Mon, 4 Dec 2023 11:14:56 +0000 (13:14 +0200)
commitda6760bdf5ed8ede203618d5118f4ceb2cb1652d
treeb6ba925bc254f38e392ff77ca0530523ff8b7012
parentcda737924fd616c4e08027888258f97e81f34447
gh-65210: Add const qualifiers in PyArg_VaParseTupleAndKeywords() (GH-105958)

Change the declaration of the keywords parameter in functions
PyArg_ParseTupleAndKeywords() and PyArg_VaParseTupleAndKeywords() from `char **`
to `char * const *` in C and `const char * const *` in C++.

It makes these functions compatible with argument of type `const char * const *`,
`const char **` or `char * const *` in C++ and `char * const *` in C
without explicit type cast.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Doc/c-api/arg.rst
Doc/extending/extending.rst
Doc/whatsnew/3.13.rst
Include/modsupport.h
Include/pyport.h
Misc/NEWS.d/next/C API/2023-06-21-11-53-09.gh-issue-65210.PhFRBJ.rst [new file with mode: 0644]
Python/getargs.c