mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-121645: Add PyBytes_Join() function (#121646)
* Replace _PyBytes_Join() with PyBytes_Join(). * Keep _PyBytes_Join() as an alias to PyBytes_Join().
This commit is contained in:
parent
7fca268bee
commit
3d60dfbe17
10 changed files with 101 additions and 12 deletions
|
@ -1283,7 +1283,7 @@ found:
|
|||
Py_CLEAR(res);
|
||||
goto end;
|
||||
}
|
||||
Py_XSETREF(res, _PyBytes_Join((PyObject *)&_Py_SINGLETON(bytes_empty), chunks));
|
||||
Py_XSETREF(res, PyBytes_Join((PyObject *)&_Py_SINGLETON(bytes_empty), chunks));
|
||||
|
||||
end:
|
||||
LEAVE_BUFFERED(self)
|
||||
|
@ -1736,7 +1736,7 @@ _bufferedreader_read_all(buffered *self)
|
|||
goto cleanup;
|
||||
}
|
||||
else {
|
||||
tmp = _PyBytes_Join((PyObject *)&_Py_SINGLETON(bytes_empty), chunks);
|
||||
tmp = PyBytes_Join((PyObject *)&_Py_SINGLETON(bytes_empty), chunks);
|
||||
res = tmp;
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
|
@ -999,7 +999,7 @@ _io__RawIOBase_readall_impl(PyObject *self)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
result = _PyBytes_Join((PyObject *)&_Py_SINGLETON(bytes_empty), chunks);
|
||||
result = PyBytes_Join((PyObject *)&_Py_SINGLETON(bytes_empty), chunks);
|
||||
Py_DECREF(chunks);
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue