]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-93202: Always use %zd printf formatter (#93201)
authorVictor Stinner <vstinner@python.org>
Wed, 25 May 2022 12:21:36 +0000 (14:21 +0200)
committerGitHub <noreply@github.com>
Wed, 25 May 2022 12:21:36 +0000 (14:21 +0200)
commit71d8775feeb647ae5003cfd466de7b58cd1bf269
treef20e104788f22dbc11c4366dce18fc74266294a8
parent9485a0dbddcee014821b41c960133632bb68b33c
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.
Doc/c-api/bytes.rst
Doc/c-api/unicode.rst
Include/pymacconfig.h
Include/pyport.h
Misc/NEWS.d/next/Build/2022-05-25-05-46-00.gh-issue-93202.T37jtj.rst [new file with mode: 0644]
Modules/_ctypes/_ctypes.c
Objects/object.c
configure
configure.ac
pyconfig.h.in