mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #12306: Add ZLIB_RUNTIME_VERSION to the zlib module.
While we're at it, also document ZLIB_VERSION. Patch by Torsten Landschoff.
This commit is contained in:
parent
249ab5e8d1
commit
64d25ddb9c
4 changed files with 40 additions and 0 deletions
|
|
@ -1169,6 +1169,10 @@ PyInit_zlib(void)
|
|||
if (ver != NULL)
|
||||
PyModule_AddObject(m, "ZLIB_VERSION", ver);
|
||||
|
||||
ver = PyUnicode_FromString(zlibVersion());
|
||||
if (ver != NULL)
|
||||
PyModule_AddObject(m, "ZLIB_RUNTIME_VERSION", ver);
|
||||
|
||||
PyModule_AddStringConstant(m, "__version__", "1.0");
|
||||
|
||||
return m;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue