Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cyclonedds/idl/_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,16 @@ def _machine_for_type(cls, _type, add_size_header, use_version_2):
elif isclass(_type) and (issubclass(_type, IdlBitmask)):
return BitMaskMachine(_type, get_idl_annotations(_type)["bit_bound"])
elif get_origin(_type) == list:
submachine = cls._machine_for_type(get_args(_type)[0], add_size_header, use_version_2)

if isinstance(submachine, PrimitiveMachine):
return PlainCdrV2SequenceOfPrimitiveMachine(submachine.type)

if isinstance(submachine, (CharMachine)):
add_size_header = False

return SequenceMachine(
cls._machine_for_type(get_args(_type)[0], add_size_header, use_version_2),
submachine,
add_size_header=add_size_header
)
elif get_origin(_type) == dict:
Expand Down