File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1780,6 +1780,23 @@ \section{Sequence Protocol \label{sequence}}
17801780\end {cfuncdesc }
17811781
17821782
1783+ \begin {cfuncdesc }{PyObject*}{PySequence_Fast}{PyObject *o, const char *m}
1784+ Returns the sequence \var {o} as a tuple, unless it is already a
1785+ tuple or list, in which case \var {o} is returned. Use
1786+ \cfunction {PySequence_Fast_GET_ITEM()} to access the members of the
1787+ result. Returns \NULL {} on failure. If the object is not a sequence,
1788+ raises \exception {TypeError} with \var {m} as the message text.
1789+ \end {cfuncdesc }
1790+
1791+ \begin {cfuncdesc }{PyObject*}{PySequence_Fast_GET_ITEM}{PyObject *o, int i}
1792+ Return the \var {i}th element of \var {o}, assuming that \var {o} was
1793+ returned by \cfunction {PySequence_Fast()}, and that \var {i} is within
1794+ bounds. The caller is expected to get the length of the sequence by
1795+ calling \cfunction {PyObject_Size()} on \var {o}, since lists and tuples
1796+ are guaranteed to always return their true length.
1797+ \end {cfuncdesc }
1798+
1799+
17831800\section {Mapping Protocol \label {mapping } }
17841801
17851802\begin {cfuncdesc }{int}{PyMapping_Check}{PyObject *o}
Original file line number Diff line number Diff line change @@ -702,6 +702,14 @@ PySequence_DelSlice:PyObject*:o:0:
702702PySequence_DelSlice:int:i1::
703703PySequence_DelSlice:int:i2::
704704
705+ PySequence_Fast:PyObject*::+1:
706+ PySequence_Fast:PyObject*:v:0:
707+ PySequence_Fast:const char*:m::
708+
709+ PySequence_Fast_GET_ITEM:PyObject*::0:
710+ PySequence_Fast_GET_ITEM:PyObject*:o:0:
711+ PySequence_Fast_GET_ITEM:int:i::
712+
705713PySequence_GetItem:PyObject*::+1:
706714PySequence_GetItem:PyObject*:o:0:
707715PySequence_GetItem:int:i::
You can’t perform that action at this time.
0 commit comments