Re: [xml] python bindings on windows



On Sat, Nov 23, 2002 at 09:06:53PM +0100, Stéphane Bidoul wrote:
I tried it both from a CVS checkout and 
from libxml2-python-2.4.28.tar.gz.

  okay,

It builds fine, except for 2 missing exports
in libxslt.def.src:
- xsltResolveStylesheetAttributeSet
- xsltSaveResultToString

  Well, that's in Igor's land :-)

Also, I noticed that the attribs.py test crashed
because of the MERGED_MODULE mode (I don't understand
exactly why, though).

  hum, strange ... I may have to look at it. Is that just on Windows ?

In any case it is not
be necessary on windows. Attached is the patch to
setup.py.in that fixes that.
The same patch also replaces '../../_bin' with '@prefix@'
and adds libexslt to the link libraries.

  Okay, applied, I'm not sure I 100%  follow the magic involved, but
from the distance it looks fine.

Next, we need to change libxsl.py to bypass
the 'dl' magic on windows. I'd suggest inserting
something like this: 

if not hasattr(sys,'getdlopenflags'):
    import libxml2mod
    import libxsltmod
    import libxml2
else: 
    ...

at the beginning of the file.

 Could you explain a bit,

Finally, there are still memory leaks in the tests,
but I'm not sure how to diagnose those. Any hint?
tstxpath.py
Memory leak 8 bytes
xpathext.py
Memory leak 8 bytes
xpathret.py
Memory leak 4 bytes

  Those are "normal". When registering extension XPath functions, the
registratyion takes 4/8 bytes and there is no mechanism yet to deallocate
them. 4 bytes lost per extension function is reasonnable still and I live
with it so far (this is platform independant). Note when you get such 
a report, libxml2.dumpMemory() saves to the .memdump file the current set of
allocated and not freed memory blocks.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]