mirror of
https://github.com/python/cpython.git
synced 2024-11-30 13:24:13 +08:00
Speed-up the joiner call by avoiding Py_BuildValue().
This commit is contained in:
parent
2460c62152
commit
bc72c5ae8b
@ -436,7 +436,11 @@ O_writelines(Oobject *self, PyObject *args) {
|
||||
|
||||
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;
|
||||
|
||||
args = PyTuple_Pack(1, tmp);
|
||||
|
Loading…
Reference in New Issue
Block a user