]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-129813, PEP 782: Use Py_GetConstant(Py_CONSTANT_EMPTY_BYTES) (#138830)
authorVictor Stinner <vstinner@python.org>
Sat, 13 Sep 2025 16:30:25 +0000 (18:30 +0200)
committerGitHub <noreply@github.com>
Sat, 13 Sep 2025 16:30:25 +0000 (18:30 +0200)
commit06b7891f12b4b93dd78704cf3fbf520ae4685064
treeae545e01c2e7953cd76560220817836563bf818f
parent8fc6ae68b0216f52232a5a929d85eb51e9f7a04d
gh-129813, PEP 782: Use Py_GetConstant(Py_CONSTANT_EMPTY_BYTES) (#138830)

Replace PyBytes_FromStringAndSize(NULL, 0) with
Py_GetConstant(Py_CONSTANT_EMPTY_BYTES). Py_GetConstant() cannot
fail.
Modules/_bz2module.c
Modules/_dbmmodule.c
Modules/_lzmamodule.c
Modules/zlibmodule.c
Objects/bytesobject.c
Objects/unicodeobject.c