diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-12-04 11:14:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-04 11:14:56 (GMT) |
commit | da6760bdf5ed8ede203618d5118f4ceb2cb1652d (patch) | |
tree | b6ba925bc254f38e392ff77ca0530523ff8b7012 /Doc/extending | |
parent | cda737924fd616c4e08027888258f97e81f34447 (diff) | |
download | cpython-da6760bdf5ed8ede203618d5118f4ceb2cb1652d.zip cpython-da6760bdf5ed8ede203618d5118f4ceb2cb1652d.tar.gz cpython-da6760bdf5ed8ede203618d5118f4ceb2cb1652d.tar.bz2 |
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>
Diffstat (limited to 'Doc/extending')
-rw-r--r-- | Doc/extending/extending.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst index 1ee7f28..745fc10 100644 --- a/Doc/extending/extending.rst +++ b/Doc/extending/extending.rst @@ -735,7 +735,7 @@ Keyword Parameters for Extension Functions The :c:func:`PyArg_ParseTupleAndKeywords` function is declared as follows:: int PyArg_ParseTupleAndKeywords(PyObject *arg, PyObject *kwdict, - const char *format, char *kwlist[], ...); + const char *format, char * const *kwlist, ...); The *arg* and *format* parameters are identical to those of the :c:func:`PyArg_ParseTuple` function. The *kwdict* parameter is the dictionary of |