mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
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.
This commit is contained in:
parent
468e5fec8a
commit
2c9b498759
2 changed files with 20 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue