ros2-dotnet / ros2_dotnet

.NET bindings for ROS2
Apache License 2.0
136 stars 54 forks source link

Fix marshalling bool parameters and return values in pInvokes #106

Closed hoffmann-stefan closed 1 year ago

hoffmann-stefan commented 1 year ago

extracted from https://github.com/ros2-dotnet/ros2_dotnet/pull/94

This fixes Issues with bools that where interpreted wrong in release builds and therefore causing wrong behavior.

See https://www.mono-project.com/docs/advanced/pinvoke/#boolean-membersfor more information on marshalling bools.

Took the following path: