]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) (#125194)
authorVictor Stinner <vstinner@python.org>
Wed, 9 Oct 2024 15:15:23 +0000 (17:15 +0200)
committerGitHub <noreply@github.com>
Wed, 9 Oct 2024 15:15:23 +0000 (17:15 +0200)
commitb9a8ca0a6aa9251cb798f34f0c9d2cc95107eec6
tree570ffb9eae19501a3a173fab2dbf56490d1f83db
parent6a39e96ab8ebc1144f713988ac6fe439e4476488
gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) (#125194)

Replace PyUnicode_New(0, 0), PyUnicode_FromString("")
and PyUnicode_FromStringAndSize("", 0)
with Py_GetConstant(Py_CONSTANT_EMPTY_STR).
22 files changed:
Doc/includes/newtypes/custom2.c
Doc/includes/newtypes/custom3.c
Doc/includes/newtypes/custom4.c
Modules/_ctypes/_ctypes.c
Modules/_datetimemodule.c
Modules/_elementtree.c
Modules/_functoolsmodule.c
Modules/_io/stringio.c
Modules/_testcapi/datetime.c
Modules/cjkcodecs/multibytecodec.c
Modules/socketmodule.c
Modules/unicodedata.c
Objects/abstract.c
Objects/exceptions.c
Objects/stringlib/unicode_format.h
Parser/pegen_errors.c
Python/Python-tokenize.c
Python/ceval.c
Python/codecs.c
Python/formatter_unicode.c
Python/marshal.c
Python/symtable.c