-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly inform that a BoundedSequence is bounded #71
Conversation
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, pending green CI. Left a couple questions to make sure we're on the same page.
@[ else]@ | ||
size_t array_size = 0; | ||
full_bounded = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MiguelCompany because it is unbounded, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct.
@@ -530,12 +530,11 @@ size_t max_serialized_size_@('__'.join([package_name] + list(interface_path.pare | |||
size_t array_size = @(member.type.size); | |||
@[ elif isinstance(member.type, BoundedSequence)]@ | |||
size_t array_size = @(member.type.maximum_size); | |||
is_plain = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MiguelCompany because it is too early to know, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because any sequence will mean the type is not POD, and this is already covered below on the if isinstance(member.type, AbstractSequence)
@[ end if]@ | ||
@[ if isinstance(member.type, AbstractSequence)]@ | ||
full_bounded = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MiguelCompany because it may be abstract and bounded, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because BoundedSequence
inherits from AbstractSequence
and should return full_bounded = true
This PR fixes a mistake I made on #67, that made bounded sequences be treated as unbounded ones.
The full fix also needs ros2/rmw_fastrtps#540, so that serialization sizes are calculated correctly.