gh-118379: Use PyTuple_Pack instead of Py_BuildValue if possible (GH-118381)

This commit is contained in:
Nice Zombies 2024-04-30 16:55:15 +02:00 • committed by GitHub
parent 17a8af9508
commit 9a75d56d5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 9 additions and 9 deletions

View file

@ -5500,7 +5500,7 @@ os__path_splitroot_ex_impl(PyObject *module, PyObject *path)
if (tail == NULL) {
goto exit;
}
result = Py_BuildValue("(OOO)", drv, root, tail);
result = PyTuple_Pack(3, drv, root, tail);
exit:
PyMem_Free(buffer);
Py_XDECREF(drv);