@@ -109,7 +109,9 @@ Pack functions
109
109
The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an
110
110
:c:type:`int` argument, non-zero if you want the bytes string in little-endian
111
111
format (exponent last, at ``p+1 ``, ``p+3 ``, or ``p+6 `` ``p+7 ``), zero if you
112
- want big-endian format (exponent first, at *p *).
112
+ want big-endian format (exponent first, at *p *). The :c:data:`PY_BIG_ENDIAN`
113
+ constant can be used to use the native endian: it is equal to ``1`` on big
114
+ endian processor, or ``0`` on little endian processor.
113
115
114
116
Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set,
115
117
most likely :exc: `OverflowError `).
@@ -138,7 +140,9 @@ Unpack functions
138
140
The unpack routines read 2, 4 or 8 bytes, starting at *p *. *le * is an
139
141
:c:type: `int ` argument, non-zero if the bytes string is in little-endian format
140
142
(exponent last, at ``p+1 ``, ``p+3 `` or ``p+6 `` and ``p+7 ``), zero if big-endian
141
- (exponent first, at *p *).
143
+ (exponent first, at *p *). The :c:data:`PY_BIG_ENDIAN` constant can be used to
144
+ use the native endian: it is equal to ``1`` on big endian processor, or ``0``
145
+ on little endian processor.
142
146
143
147
Return value: The unpacked double. On error, this is ``-1.0`` and
144
148
:c:func:`PyErr_Occurred` is true (and an exception is set, most likely
0 commit comments