Skip to content

Commit 4878da5

Browse files
authored
PEP 756: Fix buffer format (#3967)
Use the native encoding. "=I" size is 4 bytes on all platforms.
1 parent 5a1529c commit 4878da5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

peps/pep-0756.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ export format:
171171
Export format Buffer format Item size
172172
========================== ================== ============
173173
``PyUnicode_FORMAT_UCS1`` ``"B"`` 1 byte
174-
``PyUnicode_FORMAT_UCS2`` ``"H"`` 2 bytes
175-
``PyUnicode_FORMAT_UCS4`` ``"I"`` or ``"L"`` 4 bytes
174+
``PyUnicode_FORMAT_UCS2`` ``"=H"`` 2 bytes
175+
``PyUnicode_FORMAT_UCS4`` ``"=I"`` 4 bytes
176176
``PyUnicode_FORMAT_UTF8`` ``"B"`` 1 byte
177177
``PyUnicode_FORMAT_ASCII`` ``"B"`` 1 byte
178178
========================== ================== ============

0 commit comments

Comments
 (0)