summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2011-04-25 20:10:18 (GMT)
committerR David Murray <rdmurray@bitdance.com>2011-04-25 20:10:18 (GMT)
commita0895db2e1e94a7a2dfba4f75475975720aae224 (patch)
tree9900a491999976583c55d6d8a49533b195b5731d
parentf93bb262eb52803cad52b87728f5c8094207c2cb (diff)
downloadcpython-a0895db2e1e94a7a2dfba4f75475975720aae224.zip
cpython-a0895db2e1e94a7a2dfba4f75475975720aae224.tar.gz
cpython-a0895db2e1e94a7a2dfba4f75475975720aae224.tar.bz2
#11901: add description of how bitfields are laid out to hexversion docs
Patch by Sijin Joseph.
-rw-r--r--Doc/library/sys.rst24
-rw-r--r--Misc/ACKS1
2 files changed, 25 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 12f861b..1598d96 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -562,6 +562,30 @@ always available.
``version_info`` value may be used for a more human-friendly encoding of the
same information.
+ The ``hexversion`` is a 32-bit number with the following layout
+
+ +-------------------------+------------------------------------------------+
+ | bits (big endian order) | meaning |
+ +=========================+================================================+
+ | :const:`1-8` | ``PY_MAJOR_VERSION`` (the ``2`` in |
+ | | ``2.1.0a3``) |
+ +-------------------------+------------------------------------------------+
+ | :const:`9-16` | ``PY_MINOR_VERSION`` (the ``1`` in |
+ | | ``2.1.0a3``) |
+ +-------------------------+------------------------------------------------+
+ | :const:`17-24` | ``PY_MICRO_VERSION`` (the ``0`` in |
+ | | ``2.1.0a3``) |
+ +-------------------------+------------------------------------------------+
+ | :const:`25-28` | ``PY_RELEASE_LEVEL`` (``0xA`` for alpha, |
+ | | ``0xB`` for beta, ``0xC`` for gamma and |
+ | | ``0xF`` for final) |
+ +-------------------------+------------------------------------------------+
+ | :const:`29-32` | ``PY_RELEASE_SERIAL`` (the ``3`` in |
+ | | ``2.1.0a3``) |
+ +-------------------------+------------------------------------------------+
+
+ thus ``2.1.0a3`` is hexversion ``0x020100a3``
+
.. versionadded:: 1.5.2
diff --git a/Misc/ACKS b/Misc/ACKS
index e614e0d..450a3a5 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -411,6 +411,7 @@ Irmen de Jong
Lucas de Jonge
John Jorgensen
Jens B. Jorgensen
+Sijin Joseph
Andreas Jung
Tattoo Mabonzo K.
Bob Kahn