mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
gh-93202: Always use %zd printf formatter (#93201)
Python now always use the ``%zu`` and ``%zd`` printf formats to format a size_t or Py_ssize_t number. Building Python 3.12 requires a C11 compiler, so these printf formats are now always supported. * PyObject_Print() and _PyObject_Dump() now use the printf %zd format to display an object reference count. * Update PY_FORMAT_SIZE_T comment. * Remove outdated notes about the %zd format in PyBytes_FromFormat() and PyUnicode_FromFormat() documentations. * configure no longer checks for the %zd format and no longer defines PY_FORMAT_SIZE_T macro in pyconfig.h. * pymacconfig.h no longer undefines PY_FORMAT_SIZE_T: macOS 10.4 is no longer supported. Python 3.12 now requires macOS 10.6 (Snow Leopard) or newer.
This commit is contained in:
parent
9485a0dbdd
commit
71d8775fee
10 changed files with 11 additions and 168 deletions
|
@ -58,9 +58,6 @@ called with a non-bytes parameter.
|
|||
|
||||
.. % XXX: This should be exactly the same as the table in PyErr_Format.
|
||||
.. % One should just refer to the other.
|
||||
.. % XXX: The descriptions for %zd and %zu are wrong, but the truth is complicated
|
||||
.. % because not all compilers support the %z width modifier -- we fake it
|
||||
.. % when necessary via interpolating PY_FORMAT_SIZE_T.
|
||||
|
||||
.. tabularcolumns:: |l|l|L|
|
||||
|
||||
|
|
|
@ -397,10 +397,6 @@ APIs:
|
|||
ASCII-encoded string. The following format characters are allowed:
|
||||
|
||||
.. % This should be exactly the same as the table in PyErr_Format.
|
||||
.. % The descriptions for %zd and %zu are wrong, but the truth is complicated
|
||||
.. % because not all compilers support the %z width modifier -- we fake it
|
||||
.. % when necessary via interpolating PY_FORMAT_SIZE_T.
|
||||
.. % Similar comments apply to the %ll width modifier and
|
||||
|
||||
.. tabularcolumns:: |l|l|L|
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue