summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/veryhigh.rst
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-06-13 00:01:29 (GMT)
committerGitHub <noreply@github.com>2019-06-13 00:01:29 (GMT)
commit2c9b498759f4fc74da82a0a96d059d666fa73f16 (patch)
treef806e0a7172261f5af3b29acdaf5f5da673cec28 /Doc/c-api/veryhigh.rst
parent468e5fec8a2f534f1685d59da3ca4fad425c38dd (diff)
downloadcpython-2c9b498759f4fc74da82a0a96d059d666fa73f16.zip
cpython-2c9b498759f4fc74da82a0a96d059d666fa73f16.tar.gz
cpython-2c9b498759f4fc74da82a0a96d059d666fa73f16.tar.bz2
bpo-37253: Document PyCompilerFlags.cf_feature_version (GH-14019)
* Update PyCompilerFlags structure documentation. * Document the new cf_feature_version field in the Changes in the C API section of the What's New in Python 3.8 doc.
Diffstat (limited to 'Doc/c-api/veryhigh.rst')
-rw-r--r--Doc/c-api/veryhigh.rst19
1 files changed, 15 insertions, 4 deletions
diff --git a/Doc/c-api/veryhigh.rst b/Doc/c-api/veryhigh.rst
index 3fe0ae4..835afcb 100644
--- a/Doc/c-api/veryhigh.rst
+++ b/Doc/c-api/veryhigh.rst
@@ -388,11 +388,22 @@ the same library that the Python runtime is using.
Whenever ``PyCompilerFlags *flags`` is *NULL*, :attr:`cf_flags` is treated as
equal to ``0``, and any modification due to ``from __future__ import`` is
- discarded. ::
+ discarded.
- struct PyCompilerFlags {
- int cf_flags;
- }
+ .. c:member:: int cf_flags
+
+ Compiler flags.
+
+ .. c:member:: int cf_feature_version;
+
+ *cf_feature_version* is the minor Python version. It should be
+ initialized to ``PY_MINOR_VERSION``.
+
+ The field is ignored by default, it is used if and only if
+ ``PyCF_ONLY_AST`` flag is set in *cf_flags*.
+
+ .. versionchanged:: 3.8
+ Added *cf_feature_version* field.
.. c:var:: int CO_FUTURE_DIVISION