Eliminate a big block of duplicate code in PySequence_List() by

exposing _PyList_Extend().
This commit is contained in:
Raymond Hettinger 2004-03-11 09:13:12 +00:00
parent 97bc618229
commit 8ca92ae54c
3 changed files with 13 additions and 54 deletions

View file

@ -41,6 +41,7 @@ PyAPI_FUNC(int) PyList_SetSlice(PyObject *, int, int, PyObject *);
PyAPI_FUNC(int) PyList_Sort(PyObject *);
PyAPI_FUNC(int) PyList_Reverse(PyObject *);
PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *);
PyAPI_FUNC(PyObject *) _PyList_Extend(PyListObject *, PyObject *);
/* Macro, trading safety for speed */
#define PyList_GET_ITEM(op, i) (((PyListObject *)(op))->ob_item[i])