Skip to content

Commit

Permalink
Address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Aug 29, 2023
1 parent a8ba2b8 commit 96502df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions Doc/howto/clinic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ process a single source file, like this:
The CLI supports the following options:

.. program:: ./Tools/clinic/clinic.py [-h] [-f] [-o OUTPUT] [-v] \
[--converters] [--make] [--srcdir SRCDIR] [FILE ...]
[--converters] [--make] [--srcdir SRCDIR] [--limited] [FILE ...]

.. option:: -h, --help

Expand Down Expand Up @@ -193,6 +193,11 @@ The CLI supports the following options:
A file to exclude in :option:`--make` mode.
This option can be given multiple times.

.. option:: --limited

Use the :ref:`Limited API <limited-c-api>` to parse arguments in the generated C code.
See :ref:`How to use the Limited C API <clinic-howto-limited-capi>`.

.. option:: FILE ...

The list of files to process.
Expand Down Expand Up @@ -1905,13 +1910,15 @@ blocks embedded in Python files look slightly different. They look like this:
#/*[python checksum:...]*/
.. _clinic-howto-limited-capi:

How to use the Limited C API
----------------------------

If a C source code contains ``#define Py_LIMITED_API``, the generated C code
will use the :ref:`Limited API <limited-c-api>` to parse arguments. Private
functions are not used in this case and the code parsing arguments can be a
less efficient depending on the parameters (types, number, etc.).
functions are not used in this case. However the code parsing arguments can be
a less efficient depending on the parameters (types, number, etc.).

.. versionadded:: 3.13

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
:ref:`Argument Clinic <howto-clinic>` now has a partial support of the
:ref:`Limited API <limited-c-api>`. Patch by Victor Stinner.
:ref:`Limited API <limited-c-api>`: see Argument Clinic :ref:`How to use the
Limited C API <clinic-howto-limited-capi>`. Patch by Victor Stinner.

0 comments on commit 96502df

Please sign in to comment.