Commit b6639e08 authored by Jeremy Hylton's avatar Jeremy Hylton

Remove unnecessary check in tests for slots allowed.

The !PyType_Check(base) check snuck in as part of rev 2.215, but was
unrelated to the SF patch that is mentioned in the checkin comment.
The test is currently unnecessary because base is set to the return
value of best_bases(), which returns a type or NULL.
parent 696076d0
...@@ -1653,7 +1653,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) ...@@ -1653,7 +1653,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
/* Are slots allowed? */ /* Are slots allowed? */
nslots = PyTuple_GET_SIZE(slots); nslots = PyTuple_GET_SIZE(slots);
if (nslots > 0 && base->tp_itemsize != 0 && !PyType_Check(base)) { if (nslots > 0 && base->tp_itemsize != 0) {
/* for the special case of meta types, allow slots */ /* for the special case of meta types, allow slots */
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"nonempty __slots__ " "nonempty __slots__ "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment