Message 110865 - Python tracker (original) (raw)

Does Numpy correctly call PyType_Ready()?

As far as I can tell, it does:

#define DUAL_INHERIT(child, parent1, parent2)
Py##child##ArrType_Type.tp_base = &Py##parent2##ArrType_Type;
Py##child##ArrType_Type.tp_bases =
Py_BuildValue("(OO)", &Py##parent2##ArrType_Type,
&Py##parent1##_Type);
if (PyType_Ready(&Py##child##ArrType_Type) < 0) {
PyErr_Print();
PyErr_Format(PyExc_SystemError,
"could not initialize Py%sArrType_Type",
#child);
return -1;
}
Py##child##ArrType_Type.tp_hash = Py##parent1##_Type.tp_hash; ... DUAL_INHERIT(Int, Int, SignedInteger);

Could it be the multiple inheritance that causes the problem here?