CBOR tests: fix uses of map entry, iterator types#286
Open
tahina-pro wants to merge 3 commits into
Open
Conversation
Mirror upstream commit fb4e698 (which did the analogous rename on the Det side): the short polymorphic name cbor_map_entry no longer exists in the extracted nondet C header (Karamel monomorphizes it as cbor_map_entry__CBOR_Pulse_Raw_EverParse_Type_cbor_raw, with a friendly typedef alias cbor_nondet_map_entry_t in CBORNondetType.h). Update the test generator GenCBORNondetTest.ml plus the already- generated CBORNondetTest.c and example/main.c to use the alias. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The legacy typedefs cbor_map_entry, cbor_array_iterator, and cbor_map_iterator are no longer exposed by either CBORDet.h or CBORNondet.h / CBORNondetType.h. Replace the three offending typedefs in share/everparse/tests/cbor/cbor_tests.c with EVERCBOR_DET/EVERCBOR_NONDET-conditional aliases to the new public types: cbor_entry_t -> cbor_det_map_entry_t / cbor_nondet_map_entry_t cbor_v_arr_iter_t -> cbor_det_array_iterator_t / cbor_nondet_array_iterator_t cbor_v_map_iter_t -> cbor_det_map_iterator_t / cbor_nondet_map_iterator_t This unblocks compilation of both cbor_tests_det.exe and cbor_tests_nondet.exe under `make -f nofstar.Makefile cbor-shared-test`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to use
cbor_det_map_entry_t,cbor_nondet_map_entry_t,cbor_det_array_iterator_t, etc. instead of internally defined types.