API and ABI Versioning¶
PY_VERSION_HEX is the Python version number encoded in a single integer.
For example if the PY_VERSION_HEX is set to 0x030401a2, the underlying
version information can be found by treating it as a 32 bit number in
the following manner:
Bytes Bits (ordre gros-boutiste) Signification 11-8PY_MAJOR_VERSION(le3dans3.4.1a2)29-16PY_MINOR_VERSION(le4dans3.4.1a2)317-24PY_MICRO_VERSION(le1dans3.4.1a2)425-28PY_RELEASE_LEVEL(0xAfor alpha,0xBfor beta,0xCfor release candidate and0xFfor final), in this case it is alpha.29-32PY_RELEASE_SERIAL(the2in3.4.1a2, zero for final releases)
Thus 3.4.1a2 is hexversion 0x030401a2.
All the given macros are defined in Include/patchlevel.h.
