gh-115754: Use Py_GetConstant(Py_CONSTANT_EMPTY_STR) (#125583)

Replace PyUnicode_FromStringAndSize(NULL, 0)
with Py_GetConstant(Py_CONSTANT_EMPTY_STR).
This commit is contained in:
Victor Stinner 2024-10-25 11:14:52 +02:00 committed by GitHub
parent db96327203
commit ebcc578dff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -1766,7 +1766,7 @@ make_Zreplacement(PyObject *object, PyObject *tzinfoarg)
{
PyObject *temp;
PyObject *tzinfo = get_tzinfo_member(object);
PyObject *Zreplacement = PyUnicode_FromStringAndSize(NULL, 0);
PyObject *Zreplacement = Py_GetConstant(Py_CONSTANT_EMPTY_STR);
if (Zreplacement == NULL)
return NULL;