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:
Nadeem Vawda 2011-09-12 00:04:13 +02:00
parent 249ab5e8d1
commit 64d25ddb9c
4 changed files with 40 additions and 0 deletions

View file

@ -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;