From 5ff65f12a863e317d8dd0d5a5304df9afe244af3 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 5 Mar 2007 22:28:13 +0000 Subject: Patch #1674228: when assigning a slice (old-style), check for the sq_ass_slice instead of the sq_slice slot. (backport from rev. 54139) --- Python/ceval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/ceval.c b/Python/ceval.c index 1ee0f3b603..690b2be9b7 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3926,7 +3926,7 @@ assign_slice(PyObject *u, PyObject *v, PyObject *w, PyObject *x) PyTypeObject *tp = u->ob_type; PySequenceMethods *sq = tp->tp_as_sequence; - if (sq && sq->sq_slice && ISINDEX(v) && ISINDEX(w)) { + if (sq && sq->sq_ass_slice && ISINDEX(v) && ISINDEX(w)) { Py_ssize_t ilow = 0, ihigh = PY_SSIZE_T_MAX; if (!_PyEval_SliceIndex(v, &ilow)) return -1; -- cgit v1.2.1