[Python-checkins] cpython (merge 3.1 -> 3.2): Merge #11901: add description of how bitfields are laid out to hexversion docs

r.david.murray python-checkins at python.org
Mon Apr 25 22:15:10 CEST 2011


http://hg.python.org/cpython/rev/cca4c92bf337
changeset: 69560:cca4c92bf337
branch: 3.2
parent: 69556:2f2c7eb27437
parent: 69559:b84384fbdbf0
user: R David Murray <rdmurray at bitdance.com>
date: Mon Apr 25 16:13:54 2011 -0400
summary:
 Merge #11901: add description of how bitfields are laid out to hexversion docs
Patch by Sijin Joseph.
files:
 Doc/library/sys.rst | 23 +++++++++++++++++++++++
 Misc/ACKS | 1 +
 2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -552,6 +552,29 @@
 ``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``
 
 .. data:: int_info
 
diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -442,6 +442,7 @@
 Lucas de Jonge
 John Jorgensen
 Jens B. Jorgensen
+Sijin Joseph
 Andreas Jung
 Tattoo Mabonzo K.
 Bob Kahn
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /