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.


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 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 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 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

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?
Memory leak 8 bytes
Memory leak 8 bytes
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 Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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