mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-117139: Add _PyTuple_FromStackRefSteal and use it (#121244)
Avoids the extra conversion from stack refs to PyObjects.
This commit is contained in:
parent
1ac273224a
commit
8e8d202f55
8 changed files with 28 additions and 33 deletions
|
@ -21,6 +21,7 @@ extern PyStatus _PyTuple_InitGlobalObjects(PyInterpreterState *);
|
|||
#define _PyTuple_ITEMS(op) _Py_RVALUE(_PyTuple_CAST(op)->ob_item)
|
||||
|
||||
extern PyObject *_PyTuple_FromArray(PyObject *const *, Py_ssize_t);
|
||||
PyAPI_FUNC(PyObject *)_PyTuple_FromStackRefSteal(const union _PyStackRef *, Py_ssize_t);
|
||||
PyAPI_FUNC(PyObject *)_PyTuple_FromArraySteal(PyObject *const *, Py_ssize_t);
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue