mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Extended tuple's C API to include a new function, PyTuple_Pack() that is
useful for rapidly building argument tuples without having to invoke the more sophisticated machinery of Py_BuildValue().
This commit is contained in:
parent
d662548c72
commit
cb2da43db8
4 changed files with 37 additions and 1 deletions
|
@ -35,6 +35,7 @@ PyAPI_FUNC(PyObject *) PyTuple_GetItem(PyObject *, int);
|
|||
PyAPI_FUNC(int) PyTuple_SetItem(PyObject *, int, PyObject *);
|
||||
PyAPI_FUNC(PyObject *) PyTuple_GetSlice(PyObject *, int, int);
|
||||
PyAPI_FUNC(int) _PyTuple_Resize(PyObject **, int);
|
||||
PyAPI_FUNC(PyObject *) PyTuple_Pack(int, ...);
|
||||
|
||||
/* Macro, trading safety for speed */
|
||||
#define PyTuple_GET_ITEM(op, i) (((PyTupleObject *)(op))->ob_item[i])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue