Fix dynamic attribute inheritance in C++

`PyType_Ready` would usually perform the inheritance for us, but it
can't adjust `tp_basicsize` appropriately.
This commit is contained in:
Dean Moldovan
2016-10-14 18:01:17 +02:00
parent 5c13749aea
commit b8cb5ca7bd
3 changed files with 17 additions and 8 deletions

View File

@@ -179,6 +179,9 @@ struct type_record {
bases.append((PyObject *) base_info->type);
if (base_info->type->tp_dictoffset != 0)
dynamic_attr = true;
if (caster)
base_info->implicit_casts.push_back(std::make_pair(type, caster));
}