Issue #12306: Add ZLIB_RUNTIME_VERSION to the zlib module.
While we're at it, also document ZLIB_VERSION.
Patch by Torsten Landschoff.
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index f1f84e3..a6da056 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -1169,6 +1169,10 @@
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;