mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
Create an empty string with the new Unicode API.
This commit is contained in:
parent
08b523a194
commit
b37b17423b
2 changed files with 3 additions and 3 deletions
|
@ -633,7 +633,7 @@ MultibyteCodec_Decode(MultibyteCodecObject *self,
|
|||
if (datalen == 0) {
|
||||
PyBuffer_Release(&pdata);
|
||||
ERROR_DECREF(errorcb);
|
||||
return make_tuple(PyUnicode_FromUnicode(NULL, 0), 0);
|
||||
return make_tuple(PyUnicode_New(0, 0), 0);
|
||||
}
|
||||
|
||||
buf.excobj = NULL;
|
||||
|
@ -1265,7 +1265,7 @@ mbstreamreader_iread(MultibyteStreamReaderObject *self,
|
|||
Py_ssize_t rsize, finalsize = 0;
|
||||
|
||||
if (sizehint == 0)
|
||||
return PyUnicode_FromUnicode(NULL, 0);
|
||||
return PyUnicode_New(0, 0);
|
||||
|
||||
buf.outobj = buf.excobj = NULL;
|
||||
cres = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue