NordicSemiconductor / zcbor

Low footprint C/C++ CBOR library and Python tool providing code generation from CDDL descriptions.
Apache License 2.0
105 stars 34 forks source link

zcbor.py: Fix a few bugs in code generation to do with dereferencing #414

Closed oyvindronningstad closed 2 months ago

oyvindronningstad commented 3 months ago

This introduces the concept of delegated types, where the a type takes on the C type of one of its children. This was handled via a shortcut that failed for certain corner cases.

This also refactors the "skip" mechanism which was inconsistently referring to itself or its parent, as part of the shortcut mentioned above.

Add tests