From: Fred Drake Date: Thu, 21 Dec 2000 17:25:07 +0000 (+0000) Subject: When using the latest & greatest version of Expat (currently in the Expat X-Git-Tag: v2.1a1~503 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=738293d663d426ed5bca8d59d9e290bc3d339eb0;p=python When using the latest & greatest version of Expat (currently in the Expat CVS repository), provide the library version information. --- diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c index ab0b840fd4..184678a814 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