Re: Expat with UTF-32 support (as implemented in 4Suite.org)
Jeremy Kloth <[email protected]>
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Organization | Fourthought, Inc. |
| Message-ID | <[email protected]> |
On Monday 03 October 2005 11:41 pm, Raphael Bossek wrote: > Without the UTF-32 support in libexpat it will be mutch harder for > me to maintain 4suite.org package for Debian GNU/Linux. The usage > for libexpat instead of staticly linking the 4suite.org extension > into the Python modules is mandatory for mod_python environments. > We have to make sure only one version of expat symbols is loaded > into memory. It will make no difference if the platform's libexpat would have this support unless it was compiled with the same settings for XML_Char as Python does for Py_UNICODE. By doing that, no transcoding is required to go from Expat strings to Python unicode objects, a large performance boost. Linking to libexpat is only required for ELF systems not using symbol visibility (GCC 4 or 3.4+patch). However, until Python gets updated to support that, it is in apache/mod_python's hands to do so. > Any idears are welcome. In the meantime I'l investigate the patch > done by the 4suite.org team and make a patch agains latest CVS. > I've also see MSVC 6.0 support in it. Is there any interest in it? One idea to solve this constant PITA wrt mod_python/apache would be a way to define a "prefix" for all exported symbols. So, for example in expat.h, instead of: XMLPARSEAPI(XML_Parser) XML_ParserCreate(const XML_Char *encoding); it could be something like: XMLPARSEAPI(XML(Parser)) XML(ParserCreate)(const XML_Char *encoding); where: #define XML_PREFIX XML #define XML(name) XML_PREFIX#_#name Just a thought. -- Jeremy Kloth Fourthought, Inc. http://fourthought.com/ http://4suite.org/