On the FFI page, the Rust signatures of the functions snappy_compress, snappy_uncompress, snappy_uncompressed_length and snappy_validate_compressed_buffer are declared as returning c_int. In the C header file for snappy, the return types are given as snappy_status, which is an enum type:
On the FFI page, the Rust signatures of the functions
snappy_compress
,snappy_uncompress
,snappy_uncompressed_length
andsnappy_validate_compressed_buffer
are declared as returningc_int
. In the C header file for snappy, the return types are given assnappy_status
, which is an enum type:Given that C does not guarantee that an enum's underlying type is
int
, shouldn't the return type on the Rust side be an enum declared with#[repr(C)]
?