Elektrine lite

← Feed

@briansmith@indieweb.social

2026-05-18 15:20 UTC

Why does OpenSSL (and forks) use `int` when it could use `enum`? I think the main issue is with the ABI of `enum`. It could be inconsistent even between compilers that agree on the rest of the ABI; in fact, the representation of enums was sometimes a compiler flag. C23 provides a potential solution: the equivalent of Rust’s `#[repr(c_int)]`. Then the issue becomes more of a *source* backward compatibility issue with older versions of the library, and the desire to support ancient compilers.

Replies (0)

No replies.