8000 Apply suggestions. · python/cpython@4ff9e8f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ff9e8f

Browse files
Apply suggestions.
1 parent 910c5d2 commit 4ff9e8f

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

Doc/c-api/arg.rst

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,9 +428,7 @@ API Functions
428428
429429
The *keywords* parameter declaration is :c:expr:`char * const *` in C and
430430
:c:expr:`const char * const *` in C++.
431-
This can be overridden by defining the macro :c:macro:`PY_CXX_CONST`
432-
before including :file:`Python.h` as ``const`` for the latter and as
433-
empty value for the former.
431+
This can be overridden with the :c:macro:`PY_CXX_CONST` macro.
434432
435433
.. versionchanged:: 3.6
436434
Added support for :ref:`positional-only parameters
@@ -516,6 +514,19 @@ API Functions
516514
517515
PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
518516
517+
.. c:macro:: PY_CXX_CONST
518+
519+
The value to be inserted, if any, before :c:expr:`char * const *`
520+
in the *keywords* parameter declaration of
521+
:c:func:`PyArg_ParseTupleAndKeywords` and
522+
:c:func:`PyArg_VaParseTupleAndKeywords`.
523+
Default empty for C and ``const`` for C++
524+
(:c:expr:`const char * const *`).
525+
To override, define it to the desired value before including
526+
:file:`Python.h`.
527+
528+
.. versionadded:: 3.13
529+
519530
520531
---------------
521532
Building values

Doc/whatsnew/3.13.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,13 +1107,11 @@ New Features
11071107
* The *keywords* parameter of :c:func:`PyArg_ParseTupleAndKeywords` and
11081108
:c:func:`PyArg_VaParseTupleAndKeywords` has now type :c:expr:`char * const *`
11091109
in C and :c:expr:`const char * const *` in C++, instead of :c:expr:`char **`.
1110-
It makes these functions compatible with argument of type
1110+
It makes these functions compatible with arguments of type
11111111
:c:expr:`const char * const *`, :c:expr:`const char **` or
11121112
:c:expr:`char * const *` in C++ and :c:expr:`char * const *` in C
1113-
without explicit type cast.
1114-
This can be overridden by defining the macro ``PY_CXX_CONST``
1115-
before including :file:`Python.h` as ``const`` for the latter and as
1116-
empty value for the former.
1113+
without an explicit type cast.
1114+
This can be overridden with the :c:macro:`PY_CXX_CONST` macro.
11171115
(Contributed by Serhiy Storchaka in :gh:`65210`.)
11181116

11191117
* Add :c:func:`PyImport_AddModuleRef`: similar to

0 commit comments

Comments
 (0)
0