mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Undo the last chunk of the previous patch, putting back a useful
assert into PyType_Ready(): now that we're not clearing tp_dict, we can assert that it's non-NULL again.
This commit is contained in:
parent
a386209754
commit
cab05807fc
1 changed files with 3 additions and 1 deletions
|
|
@ -2175,8 +2175,10 @@ PyType_Ready(PyTypeObject *type)
|
|||
PyTypeObject *base;
|
||||
int i, n;
|
||||
|
||||
if (type->tp_flags & Py_TPFLAGS_READY)
|
||||
if (type->tp_flags & Py_TPFLAGS_READY) {
|
||||
assert(type->tp_dict != NULL);
|
||||
return 0;
|
||||
}
|
||||
assert((type->tp_flags & Py_TPFLAGS_READYING) == 0);
|
||||
|
||||
type->tp_flags |= Py_TPFLAGS_READYING;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue