Skip to content

Commit cf2d59f

Browse files
Merge pull request #3 from encukou/document-c-api-compiler-flags
Reorganize compiler flag docs
2 parents fb44e8a + 8709a4d commit cf2d59f

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

Doc/c-api/veryhigh.rst

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,6 @@ the same library that the Python runtime is using.
333333
equal to ``0``, and any modification due to ``from __future__ import`` is
334334
discarded.
335335
336-
The available :ref:`compiler flags <ast-compiler-flags>` are accessible as macros.
337-
338336
.. c:member:: int cf_flags
339337
340338
Compiler flags.
@@ -350,23 +348,20 @@ the same library that the Python runtime is using.
350348
.. versionchanged:: 3.8
351349
Added *cf_feature_version* field.
352350
353-
.. c:macro:: PyCF_ALLOW_TOP_LEVEL_AWAIT
354-
355-
Equivalent to :data:`ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`.
356-
357-
.. c:macro:: PyCF_ONLY_AST
358-
359-
Equivalent to :data:`ast.PyCF_ONLY_AST`.
360-
361-
.. c:macro:: PyCF_OPTIMIZED_AST
351+
The available compiler flags are accessible as macros:
362352
363-
Equivalent to :data:`ast.PyCF_OPTIMIZED_AST`.
353+
.. c:namespace:: NULL
364354
365-
.. c:macro:: PyCF_TYPE_COMMENTS
355+
.. c:macro:: PyCF_ALLOW_TOP_LEVEL_AWAIT
356+
PyCF_ONLY_AST
357+
PyCF_OPTIMIZED_AST
358+
PyCF_TYPE_COMMENTS
366359
367-
Equivalent to :data:`ast.PyCF_TYPE_COMMENTS`.
360+
See :ref:`compiler flags <ast-compiler-flags>` in documentation of the
361+
:py:mod:`!ast` Python module, which exports these constants under
362+
the same names.
368363
369-
.. c:var:: int CO_FUTURE_DIVISION
364+
.. c:var:: int CO_FUTURE_DIVISION
370365
371-
This bit can be set in *flags* to cause division operator ``/`` to be
372-
interpreted as "true division" according to :pep:`238`.
366+
This bit can be set in *flags* to cause division operator ``/`` to be
367+
interpreted as "true division" according to :pep:`238`.

0 commit comments

Comments
 (0)