summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2022-12-17 07:42:18 (GMT)
committerGitHub <noreply@github.com>2022-12-17 07:42:18 (GMT)
commit0264f634f720fbf12afaf1715a53cd1495fbd85b (patch)
tree18e683bebd867f05c9f8d83a1c5125fb88663038 /Doc/c-api
parent8edcb30c3f8bdd8099a093146fedbd9b63a3f667 (diff)
downloadcpython-0264f634f720fbf12afaf1715a53cd1495fbd85b.zip
cpython-0264f634f720fbf12afaf1715a53cd1495fbd85b.tar.gz
cpython-0264f634f720fbf12afaf1715a53cd1495fbd85b.tar.bz2
Docs: Use `PY_VERSION_HEX` for version comparison (#100179)
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/apiabiversion.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/c-api/apiabiversion.rst b/Doc/c-api/apiabiversion.rst
index 85b6e2f..62d5429 100644
--- a/Doc/c-api/apiabiversion.rst
+++ b/Doc/c-api/apiabiversion.rst
@@ -58,6 +58,8 @@ 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``.
+ Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``.
+
This version is also available via the symbol :data:`Py_Version`.
.. c:var:: const unsigned long Py_Version