closes bpo-39953: Generate ifdefs around library code definitions. (GH-19490)

This commit is contained in:
Benjamin Peterson 2020-04-12 13:59:31 -05:00 committed by GitHub
parent 41d5b94af4
commit 909b87d2bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 1 deletions

View file

@ -76,7 +76,9 @@ if __name__ == "__main__":
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("")