Fix bad bug in structseq slicing (NULL pointers in result). Reported by
Jack Jansen on python-dev.
Add simple test case.
Move vereq() from test_descr to test_support (it's handy!).
diff --git a/Objects/structseq.c b/Objects/structseq.c
index 50448c2..7ad607b 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -75,7 +75,7 @@
for(i = low; i < high; ++i) {
PyObject *v = obj->ob_item[i];
Py_INCREF(v);
- PyTuple_SET_ITEM(np, i, v);
+ PyTuple_SET_ITEM(np, i-low, v);
}
return (PyObject *) np;
}