mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
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).
This commit is contained in:
parent
6a39e96ab8
commit
b9a8ca0a6a
22 changed files with 35 additions and 35 deletions
|
@ -413,7 +413,7 @@ unicodedata_UCD_decomposition_impl(PyObject *self, int chr)
|
|||
if (UCD_Check(self)) {
|
||||
const change_record *old = get_old_record(self, c);
|
||||
if (old->category_changed == 0)
|
||||
return PyUnicode_FromString(""); /* unassigned */
|
||||
return Py_GetConstant(Py_CONSTANT_EMPTY_STR); /* unassigned */
|
||||
}
|
||||
|
||||
if (code < 0 || code >= 0x110000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue