Skip to content

Commit

Permalink
Apply suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Dec 1, 2023
1 parent 910c5d2 commit 4ff9e8f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
17 changes: 14 additions & 3 deletions Doc/c-api/arg.rst
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,7 @@ API Functions
The *keywords* parameter declaration is :c:expr:`char * const *` in C and
:c:expr:`const char * const *` in C++.
This can be overridden by defining the macro :c:macro:`PY_CXX_CONST`
before including :file:`Python.h` as ``const`` for the latter and as
empty value for the former.
This can be overridden with the :c:macro:`PY_CXX_CONST` macro.
.. versionchanged:: 3.6
Added support for :ref:`positional-only parameters
Expand Down Expand Up @@ -516,6 +514,19 @@ API Functions
PyArg_ParseTuple(args, "O|O:ref", &object, &callback)
.. c:macro:: PY_CXX_CONST
The value to be inserted, if any, before :c:expr:`char * const *`
in the *keywords* parameter declaration of
:c:func:`PyArg_ParseTupleAndKeywords` and
:c:func:`PyArg_VaParseTupleAndKeywords`.
Default empty for C and ``const`` for C++
(:c:expr:`const char * const *`).
To override, define it to the desired value before including
:file:`Python.h`.
.. versionadded:: 3.13
---------------
Building values
Expand Down
8 changes: 3 additions & 5 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1107,13 +1107,11 @@ New Features
* The *keywords* parameter of :c:func:`PyArg_ParseTupleAndKeywords` and
:c:func:`PyArg_VaParseTupleAndKeywords` has now type :c:expr:`char * const *`
in C and :c:expr:`const char * const *` in C++, instead of :c:expr:`char **`.
It makes these functions compatible with argument of type
It makes these functions compatible with arguments of type
:c:expr:`const char * const *`, :c:expr:`const char **` or
:c:expr:`char * const *` in C++ and :c:expr:`char * const *` in C
without explicit type cast.
This can be overridden by defining the macro ``PY_CXX_CONST``
before including :file:`Python.h` as ``const`` for the latter and as
empty value for the former.
without an explicit type cast.
This can be overridden with the :c:macro:`PY_CXX_CONST` macro.
(Contributed by Serhiy Storchaka in :gh:`65210`.)

* Add :c:func:`PyImport_AddModuleRef`: similar to
Expand Down

0 comments on commit 4ff9e8f

Please sign in to comment.