mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
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:
parent
db96327203
commit
ebcc578dff
3 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue