API と ABI のバージョニング
***************************

CPython exposes its version number in the following macros. Note that
these correspond to the version code is **built** with, not
necessarily the version used at **run time**.

バージョン間の API と ABI の安定性については C API の安定性 を参照して
ください。

PY_MAJOR_VERSION

   "3.4.1a2" の "3" 。

PY_MINOR_VERSION

   "3.4.1a2" の "4" 。

PY_MICRO_VERSION

   "3.4.1a2" の "1" 。

PY_RELEASE_LEVEL

   "3.4.1a2" の "a" 。アルファでは "0xA" 、ベータでは "0xB" 、リリース
   候補では "0xC" 、最終版では "0xF" となります。

PY_RELEASE_SERIAL

   "3.4.1a2" の "2" 。最終リリースでは 0 になります。

PY_VERSION_HEX

   The Python version number encoded in a single integer.

   The underlying version information can be found by treating it as a
   32 bit number in the following manner:

   +---------+---------------------------+---------------------------+----------------------------+
   | Bytes   | Bits (big endian order)   | Meaning                   | Value for "3.4.1a2"        |
   |=========|===========================|===========================|============================|
   | 1       | 1-8                       | "PY_MAJOR_VERSION"        | "0x03"                     |
   +---------+---------------------------+---------------------------+----------------------------+
   | 2       | 9-16                      | "PY_MINOR_VERSION"        | "0x04"                     |
   +---------+---------------------------+---------------------------+----------------------------+
   | 3       | 17-24                     | "PY_MICRO_VERSION"        | "0x01"                     |
   +---------+---------------------------+---------------------------+----------------------------+
   | 4       | 25-28                     | "PY_RELEASE_LEVEL"        | "0xA"                      |
   |         +---------------------------+---------------------------+----------------------------+
   |         | 29-32                     | "PY_RELEASE_SERIAL"       | "0x2"                      |
   +---------+---------------------------+---------------------------+----------------------------+

   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 "Py_Version".

const unsigned long Py_Version
    * 次に属します: Stable ABI (バージョン 3.11 より).*

   The Python runtime version number encoded in a single constant
   integer, with the same format as the "PY_VERSION_HEX" macro. This
   contains the Python version used at run time.

   バージョン 3.11 で追加.

All the given macros are defined in Include/patchlevel.h.
