diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-07-16 16:08:23 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2003-07-16 16:08:23 (GMT) |
commit | 1c7a0ea05624b7967200e07ee345d26564b11b66 (patch) | |
tree | cf9b315d09f8529f5311d93482baeb875db6366f /Objects | |
parent | 2cd773160d8ffdf40885e578cfc3919d4eb48171 (diff) | |
download | cpython-1c7a0ea05624b7967200e07ee345d26564b11b66.zip cpython-1c7a0ea05624b7967200e07ee345d26564b11b66.tar.gz cpython-1c7a0ea05624b7967200e07ee345d26564b11b66.tar.bz2 |
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.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index a8c8b15..f251179 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1653,7 +1653,7 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) /* Are slots allowed? */ 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 */ PyErr_Format(PyExc_TypeError, "nonempty __slots__ " |