Skip to content

CBOR tests: fix uses of map entry, iterator types#286

Open
tahina-pro wants to merge 3 commits into
project-everest:masterfrom
tahina-pro:_taramana_cbor_test
Open

CBOR tests: fix uses of map entry, iterator types#286
tahina-pro wants to merge 3 commits into
project-everest:masterfrom
tahina-pro:_taramana_cbor_test

Conversation

@tahina-pro
Copy link
Copy Markdown
Member

to use cbor_det_map_entry_t, cbor_nondet_map_entry_t, cbor_det_array_iterator_t, etc. instead of internally defined types.

tahina-pro and others added 3 commits May 15, 2026 22:24
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant