Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert ERR_LIB_* from enum to macros
Defining our various `ERR_LIB_*` as enum values rather than macros prevents the preprocessor (or other projects preprocessors) from seeing them, potentially cuasing subtle and unexpected behavior at pre-process itme, then even more subtle at build/run time. The macro-based approach requires manually providing integer values for individual error codes, but this inconvenience is worth if for [increased OpenSSL compatibility][1]. This issue was found due to a failing [test][2] in CPython that relies on an [array built at pre-process time][3]. Prior to this change, that array was not populated with any entries, as the preprocessor wasn't aware of the `enum` in our `err.h`, though obviously the compiler would have been. [1]: https://github.com/openssl/openssl/blob/master/include/openssl/err.h.in#L72 [2]: https://github.com/python/cpython/blob/main/Lib/test/test_ssl.py#L1653 [3]: https://github.com/python/cpython/blob/main/Modules/_ssl_data_111.h#L2
- Loading branch information