"tests/test_numpy_vectorize.cpp" did not exist on "fb6aed21576f1de5e6b54f4a8279a7f64a717b30"
  • Dean Moldovan's avatar
    Make all classes with the same instance size derive from a common base · 08cbe8df
    Dean Moldovan authored
    In order to fully satisfy Python's inheritance type layout requirements,
    all types should have a common 'solid' base. A solid base is one which
    has the same instance size as the derived type (not counting the space
    required for the optional `dict_ptr` and `weakrefs_ptr`). Thus, `object`
    does not qualify as a solid base for pybind11 types and this can lead to
    issues with multiple inheritance.
    
    To get around this, new base types are created: one per unique instance
    size. There is going to be very few of these bases. They ensure Python's
    MRO checks will pass when multiple bases are involved.
    08cbe8df
test_multiple_inheritance.cpp 4.49 KB