mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-118379: Use PyTuple_Pack instead of Py_BuildValue if possible (GH-118381)
This commit is contained in:
parent
17a8af9508
commit
9a75d56d5d
6 changed files with 9 additions and 9 deletions
|
@ -1217,7 +1217,7 @@ init_ndbuf(PyObject *items, PyObject *shape, PyObject *strides,
|
|||
|
||||
/* convert scalar to list */
|
||||
if (ndim == 0) {
|
||||
items = Py_BuildValue("(O)", items);
|
||||
items = PyTuple_Pack(1, items);
|
||||
if (items == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue