[xml] python bindings initialization
- From: Stéphane Bidoul <stephane bidoul softwareag com>
- To: <xml gnome org>
- Subject: [xml] python bindings initialization
- Date: Tue, 29 Jun 2004 22:22:35 +0200
Hi,
The python binding
initialization routine
(initlibxml2mod in
python/libxml.c) does
not initialize
libxml2 by calling xmlInitParser but
tries to imitate
it.
Last time I tried to
replace that by xmlInitParser, the memory
debugging in the
test suite was complaining.
This is because
in the
cleanup, it was deallocating memory
that had
been
allocated before the memory debug functions
were put in
place.
Today, I've been bit
badly by this partial initialization
(xmlInitThreads was
not called, and it was quite needed!).
So I resolved
to fix the
memory debugging problem.
The solution I
suggest is to xmlCleanupParser
in
libxml_xmlDebugMemory before setting up
memory debugging
malloc and call xmlInitParser again.
That works
fine with the test suite.
Can you have a look
at the attached patch?
TIA.
-sbi
Attachment:
libxml.c.diff
Description: Binary data
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]