copy the metatype from the base, the base actually has one!
if (base == NULL && type != &PyBaseObject_Type)
base = type->tp_base = &PyBaseObject_Type;
+ /* Initialize the base class */
+ if (base && base->tp_dict == NULL) {
+ if (PyType_Ready(base) < 0)
+ goto error;
+ }
+
/* Initialize ob_type if NULL. This means extensions that want to be
compilable separately on Windows can call PyType_Ready() instead of
initializing the ob_type field of their type objects. */
type->tp_bases = bases;
}
- /* Initialize the base class */
- if (base && base->tp_dict == NULL) {
- if (PyType_Ready(base) < 0)
- goto error;
- }
-
/* Initialize tp_dict */
dict = type->tp_dict;
if (dict == NULL) {