summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-12-21 17:25:07 (GMT)
committerFred Drake <fdrake@acm.org>2000-12-21 17:25:07 (GMT)
commit738293d663d426ed5bca8d59d9e290bc3d339eb0 (patch)
tree5444f1f54040a1eab865e91e376c49e884b59e7e /Modules
parente412e7a3a05685ce486a7df3dec93ee563016d83 (diff)
downloadcpython-738293d663d426ed5bca8d59d9e290bc3d339eb0.zip
cpython-738293d663d426ed5bca8d59d9e290bc3d339eb0.tar.gz
cpython-738293d663d426ed5bca8d59d9e290bc3d339eb0.tar.bz2
When using the latest & greatest version of Expat (currently in the Expat
CVS repository), provide the library version information.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/pyexpat.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index ab0b840..184678a 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -926,6 +926,13 @@ initpyexpat(void)
PyModule_AddObject(m, "__version__",
PyString_FromStringAndSize(rev+11, strlen(rev+11)-2));
+#ifdef XML_MAJOR_VERSION
+ PyModule_AddStringConstant(m, "EXPAT_VERSION",
+ (char *) XML_ExpatVersion());
+ PyModule_AddObject(m, "version_info",
+ Py_BuildValue("(iii)", XML_MAJOR_VERSION,
+ XML_MINOR_VERSION, XML_MICRO_VERSION));
+#endif
/* XXX When Expat supports some way of figuring out how it was
compiled, this should check and set native_encoding