diff options
author | Gabriele N. Tornetta <P403n1x87@users.noreply.github.com> | 2021-12-10 01:52:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 01:52:05 (GMT) |
commit | 50669083fe16a42cba90b5dd8c1a017751f69fd8 (patch) | |
tree | fc2a1c7425e20d7df0b4fa44b23fdf47b5bbf35c /PC/python3dll.c | |
parent | da3cf4304f6dd530533bbd2c0913b674cd803744 (diff) | |
download | cpython-50669083fe16a42cba90b5dd8c1a017751f69fd8.zip cpython-50669083fe16a42cba90b5dd8c1a017751f69fd8.tar.gz cpython-50669083fe16a42cba90b5dd8c1a017751f69fd8.tar.bz2 |
bpo-43931: Export Python version as API data (GH-25577)
When Python is embedded in other applications, it is not easy to determine which version of Python is being used. This change exposes the Python version as part of the API data. Tools like Austin (https://github.com/P403n1x87/austin) can benefit from this data when targeting applications like uWSGI, as the Python version can then be inferred systematically by looking at the exported symbols rather than relying on unreliable pattern matching or other hacks (like remote code execution etc...).
Automerge-Triggered-By: GH:pablogsal
Diffstat (limited to 'PC/python3dll.c')
-rwxr-xr-x | PC/python3dll.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/PC/python3dll.c b/PC/python3dll.c index 6e46935..b2bb170 100755 --- a/PC/python3dll.c +++ b/PC/python3dll.c @@ -725,6 +725,7 @@ EXPORT_DATA(Py_FileSystemDefaultEncoding) EXPORT_DATA(Py_GenericAliasType) EXPORT_DATA(Py_HasFileSystemDefaultEncoding) EXPORT_DATA(Py_UTF8Mode) +EXPORT_DATA(Py_Version) EXPORT_DATA(PyBaseObject_Type) EXPORT_DATA(PyBool_Type) EXPORT_DATA(PyByteArray_Type) |