summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-03-05 22:28:13 +0000
committerGeorg Brandl <georg@python.org>2007-03-05 22:28:13 +0000
commit5ff65f12a863e317d8dd0d5a5304df9afe244af3 (patch)
treedb48608ae44ee184f469f027a5d5aff744a7564c /Python
parentaea53b81e96b63da3eb7ebe9a2c98006a78e4204 (diff)
downloadcpython-5ff65f12a863e317d8dd0d5a5304df9afe244af3.tar.gz
Patch #1674228: when assigning a slice (old-style), check for the
sq_ass_slice instead of the sq_slice slot. (backport from rev. 54139)
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
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;