summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-04-12 19:17:34 (GMT)
committerGitHub <noreply@github.com>2020-04-12 19:17:34 (GMT)
commitf35e7d3bb0488a15cbb45ff10f02be558a3777cd (patch)
tree3271a12f2ecc6d48266683bc0254bbb9aaa6d4eb /Tools
parent61511488cf4e7a1cb57a38efba7e0a84a387fe58 (diff)
downloadcpython-f35e7d3bb0488a15cbb45ff10f02be558a3777cd.zip
cpython-f35e7d3bb0488a15cbb45ff10f02be558a3777cd.tar.gz
cpython-f35e7d3bb0488a15cbb45ff10f02be558a3777cd.tar.bz2
closes bpo-39953: Generate ifdefs around library code definitions. (GH-19490)
(cherry picked from commit 909b87d2bb3d6330d39c48e43f7f50f4d086cc41) Co-authored-by: Benjamin Peterson <benjamin@python.org>
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/ssl/make_ssl_data.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Tools/ssl/make_ssl_data.py b/Tools/ssl/make_ssl_data.py
index 2297c85..f604e3a 100755
--- a/Tools/ssl/make_ssl_data.py
+++ b/Tools/ssl/make_ssl_data.py
@@ -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("")