roualdes / bridgestan

BridgeStan provides efficient in-memory access through Python, Julia, and R to the methods of a Stan model.
https://roualdes.github.io/bridgestan
BSD 3-Clause "New" or "Revised" License
88 stars 12 forks source link

Clean up our usage of Bool in FFI #229

Closed WardBrian closed 5 months ago

WardBrian commented 5 months ago

I recently ran into some issues which originated from improperly passing bool arguments as Int32s.

This appears to be fine on most architectures, especially in our case where they're small functions passing arguments on the stack, but it still seemed like something worth fixing up.

I also was made aware of the much more compact @ccall Julia macro that makes it much clearer what types are associated with which arguments