tinycbor icon indicating copy to clipboard operation
tinycbor copied to clipboard

Use a code generator to update CborKnownTags enum list from IANA

Open mofosyne opened this issue 9 months ago • 2 comments

Created https://github.com/mofosyne/iana-headers/blob/main/cbor/c/cbor-constants.h#L22-L31 but noticed that https://github.com/intel/tinycbor/blob/04b306c447d1144a868f563a5d43357fd8f5c3fd/src/cbor.h#L105-L128 has a different naming approach so it's not directly adaptable to use my existing codegenerator (written in python).

Also it doesn't seem like the enum is directly referenced in the code so am proposing to add a iana-cbor-constant.h so you can still keep the existing CborKnownTags for backwards compatibility. Other option is to manually adapt the python code to match tinycbor naming convention.

mofosyne avatar Sep 24 '23 23:09 mofosyne

Adapting the naming from your generator shouldn't be too difficult, though.

thiagomacieira avatar Sep 29 '23 23:09 thiagomacieira

Okay gave it a shot https://github.com/intel/tinycbor/pull/241/files

mofosyne avatar Oct 01 '23 07:10 mofosyne