Skip to content

Commit 96502df

Browse files
committed
Address reviews
1 parent a8ba2b8 commit 96502df

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Doc/howto/clinic.rst

+10-3
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ process a single source file, like this:
158158
The CLI supports the following options:
159159

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

163163
.. option:: -h, --help
164164

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

196+
.. option:: --limited
197+
198+
Use the :ref:`Limited API <limited-c-api>` to parse arguments in the generated C code.
199+
See :ref:`How to use the Limited C API <clinic-howto-limited-capi>`.
200+
196201
.. option:: FILE ...
197202

198203
The list of files to process.
@@ -1905,13 +1910,15 @@ blocks embedded in Python files look slightly different. They look like this:
19051910
#/*[python checksum:...]*/
19061911
19071912
1913+
.. _clinic-howto-limited-capi:
1914+
19081915
How to use the Limited C API
19091916
----------------------------
19101917

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

19161923
.. versionadded:: 3.13
19171924

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

0 commit comments

Comments
 (0)