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:
@@ -696,7 +696,7 @@ PyObject *PyCodec_IgnoreErrors(PyObject *exc)
|
||||
wrong_exception_type(exc);
|
||||
return NULL;
|
||||
}
|
||||
return Py_BuildValue("(Nn)", PyUnicode_New(0, 0), end);
|
||||
return Py_BuildValue("(Nn)", Py_GetConstant(Py_CONSTANT_EMPTY_STR), end);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user