chc.linker.CompCompatibility module

class chc.linker.CompCompatibility.CompCompatibility(comp1: CCompInfo, comp2: CCompInfo)[source]

Bases: object

Determines compatibility between two structs.

are_shallow_compatible(incompatibles: Set[Tuple[str, str]] = {}) bool[source]

Returns true if comp1 and comp2 are structurally compatible.

Note: This means the the types of comp1 and comp2 are structurally compatible taking into account a list of pairs of struct tags that are explicitly declared incompatible.

are_structurally_compatible() bool[source]

Returns true if comp1 and comp2 have the same fields.

Note: The field types are not necessarily compatible.

property comp1: CCompInfo
property comp2: CCompInfo