Commit 0e058b90 authored by Marius Wachtler's avatar Marius Wachtler

allow calling PyType_Ready on already registered pyston types

parent 2391467b
......@@ -3402,14 +3402,14 @@ extern "C" void PyType_GiveHcAttrsDictDescr(PyTypeObject* cls) noexcept {
}
extern "C" int PyType_Ready(PyTypeObject* cls) noexcept {
ASSERT(!cls->is_pyston_class, "should not call this on Pyston classes");
// if this type is already in ready state we are finished.
if (cls->tp_flags & Py_TPFLAGS_READY) {
assert(cls->tp_dict != NULL);
return 0;
}
ASSERT(!cls->is_pyston_class, "should not call this on Pyston classes");
gc::registerNonheapRootObject(cls, sizeof(PyTypeObject));
// unhandled fields:
......
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