mirror of
https://github.com/python/cpython.git
synced 2025-10-07 23:51:16 +00:00
gh-117139: Replace _PyList_FromArraySteal with stack ref variant (#122830)
This replaces `_PyList_FromArraySteal` with `_PyList_FromStackRefSteal`. It's functionally equivalent, but takes a `_PyStackRef` array instead of an array of `PyObject` pointers. Co-authored-by: Ken Jin <kenjin@python.org>
This commit is contained in:
parent
736fe4d23e
commit
ab094d1b2b
6 changed files with 13 additions and 34 deletions
|
@ -1666,13 +1666,7 @@ dummy_func(
|
|||
}
|
||||
|
||||
inst(BUILD_LIST, (values[oparg] -- list)) {
|
||||
STACKREFS_TO_PYOBJECTS(values, oparg, values_o);
|
||||
if (CONVERSION_FAILED(values_o)) {
|
||||
DECREF_INPUTS();
|
||||
ERROR_IF(true, error);
|
||||
}
|
||||
PyObject *list_o = _PyList_FromArraySteal(values_o, oparg);
|
||||
STACKREFS_TO_PYOBJECTS_CLEANUP(values_o);
|
||||
PyObject *list_o = _PyList_FromStackRefSteal(values, oparg);
|
||||
ERROR_IF(list_o == NULL, error);
|
||||
list = PyStackRef_FromPyObjectSteal(list_o);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue