File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1953,6 +1953,11 @@ \subsection{List Objects}
19531953Macro form of \cfunction {PyList_GetItem()} without error checking.
19541954\end {cfuncdesc }
19551955
1956+ \begin {cfuncdesc }{PyObject*}{PyList_SET_ITEM}{PyObject *list, int i,
1957+ PyObject *o}
1958+ Macro form of \cfunction {PyList_SetItem()} without error checking.
1959+ \end {cfuncdesc }
1960+
19561961\begin {cfuncdesc }{int}{PyList_GET_SIZE}{PyObject *list}
19571962Macro form of \cfunction {PyList_GetSize()} without error checking.
19581963\end {cfuncdesc }
Original file line number Diff line number Diff line change @@ -1953,6 +1953,11 @@ \subsection{List Objects}
19531953Macro form of \cfunction {PyList_GetItem()} without error checking.
19541954\end {cfuncdesc }
19551955
1956+ \begin {cfuncdesc }{PyObject*}{PyList_SET_ITEM}{PyObject *list, int i,
1957+ PyObject *o}
1958+ Macro form of \cfunction {PyList_SetItem()} without error checking.
1959+ \end {cfuncdesc }
1960+
19561961\begin {cfuncdesc }{int}{PyList_GET_SIZE}{PyObject *list}
19571962Macro form of \cfunction {PyList_GetSize()} without error checking.
19581963\end {cfuncdesc }
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ extern PyObject *PyList_AsTuple Py_PROTO((PyObject *));
7474
7575/* Macro, trading safety for speed */
7676#define PyList_GET_ITEM (op , i ) (((PyListObject *)(op))->ob_item[i])
77+ #define PyList_SET_ITEM (op , i , v ) (((PyListObject *)(op))->ob_item[i] = (v))
7778#define PyList_GET_SIZE (op ) (((PyListObject *)(op))->ob_size)
7879
7980#ifdef __cplusplus
Original file line number Diff line number Diff line change @@ -1282,7 +1282,7 @@ builtin_range(self, args)
12821282 Py_DECREF (v );
12831283 return NULL ;
12841284 }
1285- PyList_GET_ITEM (v , i ) = w ;
1285+ PyList_SET_ITEM (v , i , w ) ;
12861286 ilow += istep ;
12871287 }
12881288 return v ;
You can’t perform that action at this time.
0 commit comments