SICKAG / sick_scan_xd

Based on the sick_scan drivers for ROS1, sick_scan_xd merges sick_scan, sick_scan2 and sick_scan_base repositories. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2).
Apache License 2.0
101 stars 84 forks source link

Change the calling convention in sick_scan_xd_api_wrapper.c from __stdcall to __cdecl #321

Open Sertzu opened 5 months ago

Sertzu commented 5 months ago

This is a proposed solution to issue #310

Changing the calling convention from stdcall to cdecl here enables the library to operate in 32-bit mode. Since the .dll is also compiled with __cdecl as the calling convention this makes sense.

However, we weren't able to test if the library still works fine with real hardware though.

rostest commented 5 months ago

Thanks for your pull request, we appreciate your feedback and input. We will merge it by adding a customizable define to declare a specific calling convention. This way the calling convention can be set by a cmake flag, if required.

Calling conventions depend on the system; different architectures use different defaults. Calling conventions can be e.g.:

We will therefore introduce a define (cmake flag), which can be overwritten if needed.