diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-12-18 19:16:59 +0100 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-12-21 17:55:54 +0100 |
| commit | 44fc52f4f02e0f1c9fdbfa16d2bc1f6f073bfed0 (patch) | |
| tree | 7fadf08d8d07e6686c0916712c82fc3aa6c1f159 /build_scripts/platforms/unix.py | |
| parent | dacd0e5f2c087478029b68d0b65ead7ba8a49e81 (diff) | |
shiboken6: Refactor base class retrieval
AbstractMetaClass has a list of base class names and a list
of AbstractMetaClass* base instances.
AbstractMetaBuilder populates the instance list from the
names in setupInheritance() and sets a flag.
In a few places in AbstractMetaBuilder, the base class
instances are needed before this has been completed.
For this purpose, the helper
AbstractMetaBuilder::getBaseClasses() is needed.
Replace the set of classes m_setupInheritanceDone
by a flag on AbstractMetaClass. This allows for adding
an assert to AbstractMetaClass::baseClasses() ensuring
setupInheritance() has been called and taking a shortcut
in AbstractMetaBuilder::getBaseClasses().
In addition, classesTopologicalSorted() can use
AbstractMetaClass::baseClasses() instead of searching with
AbstractMetaBuilder::getBaseClasses() and can thus be
made static.
Change-Id: Iaf8209b6f6534ad91a96970a56c1e86cce054922
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit e99ac18b134469854dff05fd3bb61158f9d9ccf9)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/platforms/unix.py')
0 files changed, 0 insertions, 0 deletions
