When using the latest & greatest version of Expat (currently in the Expat

CVS repository), provide the library version information.
This commit is contained in:
Fred Drake 2000-12-21 17:25:07 +00:00
parent e412e7a3a0
commit 738293d663
1 changed files with 7 additions and 0 deletions

View File

@ -926,6 +926,13 @@ initpyexpat(void)
PyModule_AddObject(m, "__version__", PyModule_AddObject(m, "__version__",
PyString_FromStringAndSize(rev+11, strlen(rev+11)-2)); 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 /* XXX When Expat supports some way of figuring out how it was
compiled, this should check and set native_encoding compiled, this should check and set native_encoding