rusterlium / rustler

Safe Rust bridge for creating Erlang NIF functions
https://docs.rs/crate/rustler
Apache License 2.0
4.24k stars 222 forks source link

Fix type usage to use the real C types wherever applicable #592

Closed filmor closed 4 months ago

filmor commented 4 months ago

Probably because Rust always expresses strings as [u8], all const char* parameters in the NIF API were translated as u8 or uchar. The correct type for these is std::ffi::c_char which is particularly relevant on systems that use a signed char type by default (see #584).