libdart
libdart copied to clipboard
fixing an alignment bug in the C API
The purpose of this PR is to fix an embarrassing oversight in the C API header. Apparently the C API header never declared proper alignment requirements for the opaque buffers they contain. The C API was added near the end of the project and its testing isn't as comprehensive as the rest of the project. Additionally our usage was usually with heap-backed objects that would've been aligned by the global allocator. For the time being I've updated it to force alignment to whatever is the biggest between long long, double, and void*, hopefully this will suffice.
Testing Criteria:
- Hopefully the test harness for this project still works. If so, the PR checks.