@@ -51,7 +51,6 @@ static int call_trace(Py_tracefunc, PyObject *, PyFrameObject *,
5151static void call_trace_protected (Py_tracefunc , PyObject * ,
5252 PyFrameObject * , int );
5353static void call_exc_trace (Py_tracefunc , PyObject * , PyFrameObject * );
54- static PyObject * loop_subscript (PyObject * , PyObject * );
5554static PyObject * apply_slice (PyObject * , PyObject * , PyObject * );
5655static int assign_slice (PyObject * , PyObject * ,
5756 PyObject * , PyObject * );
@@ -3303,24 +3302,6 @@ ext_do_call(PyObject *func, PyObject ***pp_stack, int flags, int na, int nk)
33033302#define SLICE_ERROR_MSG \
33043303 "standard sequence type does not support step size other than one"
33053304
3306- static PyObject *
3307- loop_subscript (PyObject * v , PyObject * w )
3308- {
3309- PySequenceMethods * sq = v -> ob_type -> tp_as_sequence ;
3310- int i ;
3311- if (sq == NULL || sq -> sq_item == NULL ) {
3312- PyErr_SetString (PyExc_TypeError , "loop over non-sequence" );
3313- return NULL ;
3314- }
3315- i = PyInt_AsLong (w );
3316- v = (* sq -> sq_item )(v , i );
3317- if (v )
3318- return v ;
3319- if (PyErr_ExceptionMatches (PyExc_IndexError ))
3320- PyErr_Clear ();
3321- return NULL ;
3322- }
3323-
33243305/* Extract a slice index from a PyInt or PyLong, and store in *pi.
33253306 Silently reduce values larger than INT_MAX to INT_MAX, and silently
33263307 boost values less than -INT_MAX to 0. Return 0 on error, 1 on success.
0 commit comments