8000 Maintain constness of accessed XmlRpcValue struct by rhaschke · Pull Request #2315 · ros/ros_comm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Maintain constness of accessed XmlRpcValue struct #2315

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

rhaschke
Copy link
Contributor
@rhaschke rhaschke commented Feb 21, 2023

Return value should not change constness of this pointer!
This augments/completes #1978.

Return value should not change constness of this pointer!
Copy link
Contributor
@peci1 peci1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logically, this change makes sense. I'm a bit afraid there could be some downstream code depending on the old twisted logic, though. Not sure this would pass the API stability requirements.

I ran extensive test suite on my xmlrpcvalue wrapper and found no issues. But that's just one library.

@peci1
Copy link
Contributor
peci1 commented Apr 9, 2023

Just a note: The getter does not change constness of this->. It just returns one non-const value from the const struct (map-like) object. Yes, it seems silly, but the current API allows that. The constness is applied just to the internal pointer, not to the pointed-to value.

Copy link
Contributor
@sloretz sloretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

@sloretz sloretz merged commit ff77aa2 into ros:noetic-devel Apr 25, 2025
1 check passed
@rhaschke rhaschke deleted the fix-xmlrpc branch April 29, 2025 08:24
sloretz added a commit that referenced this pull request May 19, 2025
This reverts commit ff77aa2.

#2390

The new behavior is reasonable, but users reported it broke their
builds.

Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
sloretz added a commit that referenced this pull request May 19, 2025
…2391)

This reverts commit ff77aa2.

#2390

The new behavior is reasonable, but users reported it broke their
builds.

Signed-off-by: Shane Loretz <sloretz@intrinsic.ai>
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.

3 participants
0