diff Python/ceval.c @ 41007:6d3454c371dd legacy-trunk

Patch #1674228: when assigning a slice (old-style), check for the sq_ass_slice instead of the sq_slice slot.
author Georg Brandl <georg@python.org>
date Mon, 05 Mar 2007 22:28:08 +0000
parents ece8a39fa282
children 9cf22c5eee3d
line wrap: on
line diff
--- a/Python/ceval.c	Mon Mar 05 16:31:54 2007 +0000
+++ b/Python/ceval.c	Mon Mar 05 22:28:08 2007 +0000
@@ -3927,7 +3927,7 @@
 	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;