Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes bpo-39953: Generate ifdefs around library code definitions. #19490

Merged
merged 1 commit into from
Apr 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion Modules/_ssl_data.h
Original file line number Diff line number Diff line change
@@ -1,33 +1,85 @@
/* File generated by Tools/ssl/make_ssl_data.py */
/* Generated on 2020-04-11T14:59:43.709585 */
/* Generated on 2020-04-12T13:38:13.871723 */

static struct py_ssl_library_code library_codes[] = {
#ifdef ERR_LIB_ASN1
{"ASN1", ERR_LIB_ASN1},
#endif
#ifdef ERR_LIB_ASYNC
{"ASYNC", ERR_LIB_ASYNC},
#endif
#ifdef ERR_LIB_BIO
{"BIO", ERR_LIB_BIO},
#endif
#ifdef ERR_LIB_BN
{"BN", ERR_LIB_BN},
#endif
#ifdef ERR_LIB_CMS
{"CMS", ERR_LIB_CMS},
#endif
#ifdef ERR_LIB_COMP
{"COMP", ERR_LIB_COMP},
#endif
#ifdef ERR_LIB_CONF
{"CONF", ERR_LIB_CONF},
#endif
#ifdef ERR_LIB_CRYPTO
{"CRYPTO", ERR_LIB_CRYPTO},
#endif
#ifdef ERR_LIB_CT
{"CT", ERR_LIB_CT},
#endif
#ifdef ERR_LIB_DH
{"DH", ERR_LIB_DH},
#endif
#ifdef ERR_LIB_DSA
{"DSA", ERR_LIB_DSA},
#endif
#ifdef ERR_LIB_EC
{"EC", ERR_LIB_EC},
#endif
#ifdef ERR_LIB_ENGINE
{"ENGINE", ERR_LIB_ENGINE},
#endif
#ifdef ERR_LIB_EVP
{"EVP", ERR_LIB_EVP},
#endif
#ifdef ERR_LIB_KDF
{"KDF", ERR_LIB_KDF},
#endif
#ifdef ERR_LIB_OCSP
{"OCSP", ERR_LIB_OCSP},
#endif
#ifdef ERR_LIB_PEM
{"PEM", ERR_LIB_PEM},
#endif
#ifdef ERR_LIB_PKCS12
{"PKCS12", ERR_LIB_PKCS12},
#endif
#ifdef ERR_LIB_PKCS7
{"PKCS7", ERR_LIB_PKCS7},
#endif
#ifdef ERR_LIB_RAND
{"RAND", ERR_LIB_RAND},
#endif
#ifdef ERR_LIB_RSA
{"RSA", ERR_LIB_RSA},
#endif
#ifdef ERR_LIB_SSL
{"SSL", ERR_LIB_SSL},
#endif
#ifdef ERR_LIB_TS
{"TS", ERR_LIB_TS},
#endif
#ifdef ERR_LIB_UI
{"UI", ERR_LIB_UI},
#endif
#ifdef ERR_LIB_X509
{"X509", ERR_LIB_X509},
#endif
#ifdef ERR_LIB_X509V3
{"X509V3", ERR_LIB_X509V3},
#endif
{ NULL }
};

Expand Down
2 changes: 2 additions & 0 deletions Tools/ssl/make_ssl_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ def w(l):

w("static struct py_ssl_library_code library_codes[] = {")
for mnemo, (libcode, _, _) in sorted(error_libraries.items()):
w(f'#ifdef {libcode}')
w(' {"%s", %s},' % (mnemo, libcode))
w('#endif')
w(' { NULL }')
w('};')
w("")
Expand Down