@@ -197,44 +197,44 @@ platform-dependent.
197197+--------+--------------------------+--------------------+----------------+------------+
198198| ``c `` | :c:type: `char ` | bytes of length 1 | 1 | |
199199+--------+--------------------------+--------------------+----------------+------------+
200- | ``b `` | :c:type: `signed char ` | integer | 1 | \( 1),\( 3) |
200+ | ``b `` | :c:type: `signed char ` | integer | 1 | \( 1), \( 2) |
201201+--------+--------------------------+--------------------+----------------+------------+
202- | ``B `` | :c:type: `unsigned char ` | integer | 1 | \( 3 ) |
202+ | ``B `` | :c:type: `unsigned char ` | integer | 1 | \( 2 ) |
203203+--------+--------------------------+--------------------+----------------+------------+
204204| ``? `` | :c:type: `_Bool ` | bool | 1 | \( 1) |
205205+--------+--------------------------+--------------------+----------------+------------+
206- | ``h `` | :c:type: `short ` | integer | 2 | \( 3 ) |
206+ | ``h `` | :c:type: `short ` | integer | 2 | \( 2 ) |
207207+--------+--------------------------+--------------------+----------------+------------+
208- | ``H `` | :c:type: `unsigned short ` | integer | 2 | \( 3 ) |
208+ | ``H `` | :c:type: `unsigned short ` | integer | 2 | \( 2 ) |
209209+--------+--------------------------+--------------------+----------------+------------+
210- | ``i `` | :c:type: `int ` | integer | 4 | \( 3 ) |
210+ | ``i `` | :c:type: `int ` | integer | 4 | \( 2 ) |
211211+--------+--------------------------+--------------------+----------------+------------+
212- | ``I `` | :c:type: `unsigned int ` | integer | 4 | \( 3 ) |
212+ | ``I `` | :c:type: `unsigned int ` | integer | 4 | \( 2 ) |
213213+--------+--------------------------+--------------------+----------------+------------+
214- | ``l `` | :c:type: `long ` | integer | 4 | \( 3 ) |
214+ | ``l `` | :c:type: `long ` | integer | 4 | \( 2 ) |
215215+--------+--------------------------+--------------------+----------------+------------+
216- | ``L `` | :c:type: `unsigned long ` | integer | 4 | \( 3 ) |
216+ | ``L `` | :c:type: `unsigned long ` | integer | 4 | \( 2 ) |
217217+--------+--------------------------+--------------------+----------------+------------+
218- | ``q `` | :c:type: `long long ` | integer | 8 | \( 2), \( 3) |
218+ | ``q `` | :c:type: `long long ` | integer | 8 | \( 2) |
219219+--------+--------------------------+--------------------+----------------+------------+
220- | ``Q `` | :c:type: `unsigned long | integer | 8 | \( 2), \( 3) |
220+ | ``Q `` | :c:type: `unsigned long | integer | 8 | \( 2) |
221221| | long` | | | |
222222+--------+--------------------------+--------------------+----------------+------------+
223- | ``n `` | :c:type: `ssize_t ` | integer | | \( 4 ) |
223+ | ``n `` | :c:type: `ssize_t ` | integer | | \( 3 ) |
224224+--------+--------------------------+--------------------+----------------+------------+
225- | ``N `` | :c:type: `size_t ` | integer | | \( 4 ) |
225+ | ``N `` | :c:type: `size_t ` | integer | | \( 3 ) |
226226+--------+--------------------------+--------------------+----------------+------------+
227- | ``e `` | \( 7 ) | float | 2 | \( 5 ) |
227+ | ``e `` | \( 6 ) | float | 2 | \( 4 ) |
228228+--------+--------------------------+--------------------+----------------+------------+
229- | ``f `` | :c:type: `float ` | float | 4 | \( 5 ) |
229+ | ``f `` | :c:type: `float ` | float | 4 | \( 4 ) |
230230+--------+--------------------------+--------------------+----------------+------------+
231- | ``d `` | :c:type: `double ` | float | 8 | \( 5 ) |
231+ | ``d `` | :c:type: `double ` | float | 8 | \( 4 ) |
232232+--------+--------------------------+--------------------+----------------+------------+
233233| ``s `` | :c:type: `char[] ` | bytes | | |
234234+--------+--------------------------+--------------------+----------------+------------+
235235| ``p `` | :c:type: `char[] ` | bytes | | |
236236+--------+--------------------------+--------------------+----------------+------------+
237- | ``P `` | :c:type: `void \* ` | integer | | \( 6 ) |
237+ | ``P `` | :c:type: `void \* ` | integer | | \( 5 ) |
238238+--------+--------------------------+--------------------+----------------+------------+
239239
240240.. versionchanged :: 3.3
@@ -254,38 +254,33 @@ Notes:
254254 standard mode, it is always represented by one byte.
255255
256256(2)
257- The ``'q' `` and ``'Q' `` conversion codes are available in native mode only if
258- the platform C compiler supports C :c:type: `long long `, or, on Windows,
259- :c:type: `__int64 `. They are always available in standard modes.
260-
261- (3)
262257 When attempting to pack a non-integer using any of the integer conversion
263258 codes, if the non-integer has a :meth: `__index__ ` method then that method is
264259 called to convert the argument to an integer before packing.
265260
266261 .. versionchanged :: 3.2
267262 Use of the :meth: `__index__ ` method for non-integers is new in 3.2.
268263
269- (4 )
264+ (3 )
270265 The ``'n' `` and ``'N' `` conversion codes are only available for the native
271266 size (selected as the default or with the ``'@' `` byte order character).
272267 For the standard size, you can use whichever of the other integer formats
273268 fits your application.
274269
275- (5 )
270+ (4 )
276271 For the ``'f' ``, ``'d' `` and ``'e' `` conversion codes, the packed
277272 representation uses the IEEE 754 binary32, binary64 or binary16 format (for
278273 ``'f' ``, ``'d' `` or ``'e' `` respectively), regardless of the floating-point
279274 format used by the platform.
280275
281- (6 )
276+ (5 )
282277 The ``'P' `` format character is only available for the native byte ordering
283278 (selected as the default or with the ``'@' `` byte order character). The byte
284279 order character ``'=' `` chooses to use little- or big-endian ordering based
285280 on the host system. The struct module does not interpret this as native
286281 ordering, so the ``'P' `` format is not available.
287282
288- (7 )
283+ (6 )
289284 The IEEE 754 binary16 "half precision" type was introduced in the 2008
290285 revision of the `IEEE 754 standard <ieee 754 standard _>`_. It has a sign
291286 bit, a 5-bit exponent and 11-bit precision (with 10 bits explicitly stored),
0 commit comments