summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/apiabiversion.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/c-api/apiabiversion.rst')
-rw-r--r--Doc/c-api/apiabiversion.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/c-api/apiabiversion.rst b/Doc/c-api/apiabiversion.rst
index 04050f7..53a42e7 100644
--- a/Doc/c-api/apiabiversion.rst
+++ b/Doc/c-api/apiabiversion.rst
@@ -58,5 +58,14 @@ See :ref:`stable` for a discussion of API and ABI stability across versions.
Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is
hexversion ``0x030a00f0``.
+ This version is also available via the symbol :data:`Py_Version`.
+
+.. c:var:: const unsigned long Py_Version
+
+ The Python runtime version number encoded in a single constant integer, with
+ the same format as the c:macro:`PY_VERSION_HEX` macro.
+ This contains the Python version used at run time.
+
+ .. versionadded:: 3.11
All the given macros are defined in :source:`Include/patchlevel.h`.