mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
Speed-up the joiner call by avoiding Py_BuildValue().
This commit is contained in:
parent
2460c62152
commit
bc72c5ae8b
1 changed files with 5 additions and 1 deletions
|
|
@ -436,7 +436,11 @@ O_writelines(Oobject *self, PyObject *args) {
|
||||||
|
|
||||||
if (PyObject_Size(args) < 0) return NULL;
|
if (PyObject_Size(args) < 0) return NULL;
|
||||||
|
|
||||||
tmp = PyObject_CallFunction(joiner, "O", args);
|
args = PyTuple_Pack(1, args);
|
||||||
|
if (args == NULL)
|
||||||
|
return NULL;
|
||||||
|
tmp = PyObject_Call(joiner, args, NULL);
|
||||||
|
Py_DECREF(args);
|
||||||
UNLESS (tmp) return NULL;
|
UNLESS (tmp) return NULL;
|
||||||
|
|
||||||
args = PyTuple_Pack(1, tmp);
|
args = PyTuple_Pack(1, tmp);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue