Macro form of \cfunction{PyList_GetItem()} without error checking.
\end{cfuncdesc}
+\begin{cfuncdesc}{PyObject*}{PyList_SET_ITEM}{PyObject *list, int i,
+ PyObject *o}
+Macro form of \cfunction{PyList_SetItem()} without error checking.
+\end{cfuncdesc}
+
\begin{cfuncdesc}{int}{PyList_GET_SIZE}{PyObject *list}
Macro form of \cfunction{PyList_GetSize()} without error checking.
\end{cfuncdesc}
Macro form of \cfunction{PyList_GetItem()} without error checking.
\end{cfuncdesc}
+\begin{cfuncdesc}{PyObject*}{PyList_SET_ITEM}{PyObject *list, int i,
+ PyObject *o}
+Macro form of \cfunction{PyList_SetItem()} without error checking.
+\end{cfuncdesc}
+
\begin{cfuncdesc}{int}{PyList_GET_SIZE}{PyObject *list}
Macro form of \cfunction{PyList_GetSize()} without error checking.
\end{cfuncdesc}
/* Macro, trading safety for speed */
#define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i])
+#define PyList_SET_ITEM(op, i, v) (((PyListObject *)(op))->ob_item[i] = (v))
#define PyList_GET_SIZE(op) (((PyListObject *)(op))->ob_size)
#ifdef __cplusplus
Py_DECREF(v);
return NULL;
}
- PyList_GET_ITEM(v, i) = w;
+ PyList_SET_ITEM(v, i, w);
ilow += istep;
}
return v;