summaryrefslogtreecommitdiffstats
path: root/Modules/zlibmodule.c
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2011-09-11 22:04:13 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2011-09-11 22:04:13 (GMT)
commit64d25ddb9c31b94aadfc8c9f220b0a5759e20265 (patch)
tree442b3e50e070948f246c58618d9d6d75c809cb56 /Modules/zlibmodule.c
parent249ab5e8d1452ab7bc43b0f1e1221e0065d2e52d (diff)
downloadcpython-64d25ddb9c31b94aadfc8c9f220b0a5759e20265.zip
cpython-64d25ddb9c31b94aadfc8c9f220b0a5759e20265.tar.gz
cpython-64d25ddb9c31b94aadfc8c9f220b0a5759e20265.tar.bz2
Issue #12306: Add ZLIB_RUNTIME_VERSION to the zlib module.
While we're at it, also document ZLIB_VERSION. Patch by Torsten Landschoff.
Diffstat (limited to 'Modules/zlibmodule.c')
-rw-r--r--Modules/zlibmodule.c4
1 files changed, 4 insertions, 0 deletions
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 @@ 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;