mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Hallski complained it could not be included by itself. Daniel
* include/libxml/xmlIO.h: Hallski complained it could not be included by itself. Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Fri Apr 12 23:02:16 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* include/libxml/xmlIO.h: Hallski complained it could not be
|
||||||
|
included by itself.
|
||||||
|
|
||||||
Thu Apr 11 10:23:36 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
Thu Apr 11 10:23:36 CEST 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* configure.in: applied an IEEE flag patch for OSF/1 #77825
|
* configure.in: applied an IEEE flag patch for OSF/1 #77825
|
||||||
|
@ -205,8 +205,13 @@ if test "$with_python" != "no" ; then
|
|||||||
then
|
then
|
||||||
echo Found python in $with_python/bin/python
|
echo Found python in $with_python/bin/python
|
||||||
PYTHON="$with_python/bin/python"
|
PYTHON="$with_python/bin/python"
|
||||||
else
|
if test -x "$with_python"
|
||||||
AC_PATH_PROG(PYTHON, python python2.2 python2.1 python2.0 python1.6 python1.5)
|
then
|
||||||
|
echo Found python in $with_python/bin/python
|
||||||
|
PYTHON="$with_python/bin/python"
|
||||||
|
else
|
||||||
|
AC_PATH_PROG(PYTHON, python python2.2 python2.1 python2.0 python1.6 python1.5)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test "$PYTHON" != ""
|
if test "$PYTHON" != ""
|
||||||
then
|
then
|
||||||
|
@ -147,7 +147,7 @@ base</a>:</p>
|
|||||||
</gjob:Jobs>
|
</gjob:Jobs>
|
||||||
</gjob:Helping></pre>
|
</gjob:Helping></pre>
|
||||||
<p>While loading the XML file into an internal DOM tree is a matter of
|
<p>While loading the XML file into an internal DOM tree is a matter of
|
||||||
calling only a couple of functions, browsing the tree to gather the data and
|
calling only a couple of functions, browsing the tree to gather the ata and
|
||||||
generate the internal structures is harder, and more error prone.</p>
|
generate the internal structures is harder, and more error prone.</p>
|
||||||
<p>The suggested principle is to be tolerant with respect to the input
|
<p>The suggested principle is to be tolerant with respect to the input
|
||||||
structure. For example, the ordering of the attributes is not significant,
|
structure. For example, the ordering of the attributes is not significant,
|
||||||
|
@ -112,7 +112,7 @@ or libxslt wrappers or bindings:</p>
|
|||||||
<li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
|
<li>Petr Kozelka provides <a href="http://sourceforge.net/projects/libxml2-pas">Pascal units to glue
|
||||||
libxml2</a> with Kylix, Delphi and other Pascal compilers</li>
|
libxml2</a> with Kylix, Delphi and other Pascal compilers</li>
|
||||||
<li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
|
<li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2
|
||||||
implementation for Kylix2/D5/D6 from Borland </li>
|
implementation for Kylix2/D5/D6 from Borland</li>
|
||||||
<li>Wai-Sun "Squidster" Chia provides <a href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and
|
<li>Wai-Sun "Squidster" Chia provides <a href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and
|
||||||
libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
|
libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module
|
||||||
maintained by Tobias Peters.</li>
|
maintained by Tobias Peters.</li>
|
||||||
|
@ -226,6 +226,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} </pre>
|
} </pre>
|
||||||
</li>
|
</li>
|
||||||
<li>And then use it to save the document:
|
<li>And then use it to save the document:
|
||||||
|
@ -168,7 +168,11 @@ but not always. Assuming the allocation problem is reproductible, it is
|
|||||||
possible to find more easilly:</p>
|
possible to find more easilly:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>write down the block number xxxx not allocated</li>
|
<li>write down the block number xxxx not allocated</li>
|
||||||
<li>export the environement variable XML_MEM_BREAKPOINT=xxxx</li>
|
<li>export the environement variable XML_MEM_BREAKPOINT=xxxx , the easiest
|
||||||
|
when using GDB is to simply give the command
|
||||||
|
<p><code>set environment XML_MEM_BREAKPOINT xxxx</code></p>
|
||||||
|
<p>before running the program.</p>
|
||||||
|
</li>
|
||||||
<li>run the program under a debugger and set a breakpoint on
|
<li>run the program under a debugger and set a breakpoint on
|
||||||
xmlMallocBreakpoint() a specific function called when this precise block
|
xmlMallocBreakpoint() a specific function called when this precise block
|
||||||
is allocated</li>
|
is allocated</li>
|
||||||
@ -178,7 +182,10 @@ possible to find more easilly:</p>
|
|||||||
</ol>
|
</ol>
|
||||||
<p>I used to use a commercial tool to debug libxml memory problems but after
|
<p>I used to use a commercial tool to debug libxml memory problems but after
|
||||||
noticing that it was not detecting memory leaks that simple mechanism was
|
noticing that it was not detecting memory leaks that simple mechanism was
|
||||||
used and proved extremely efficient until now.</p>
|
used and proved extremely efficient until now. Lately I have also used <a href="http://developer.kde.org/~sewardj/">valgrind</a> with quite some
|
||||||
|
success, it is tied to the i386 architecture since it works by emulating the
|
||||||
|
processor and instruction set, it is slow but extremely efficient, i.e. it
|
||||||
|
spot memory usage errors in a very precise way.</p>
|
||||||
<h3><a name="General4">General memory requirements</a></h3>
|
<h3><a name="General4">General memory requirements</a></h3>
|
||||||
<p>How much libxml memory require ? It's hard to tell in average it depends
|
<p>How much libxml memory require ? It's hard to tell in average it depends
|
||||||
of a number of things:</p>
|
of a number of things:</p>
|
||||||
|
@ -17,9 +17,6 @@
|
|||||||
#else
|
#else
|
||||||
#include <libxml/xmlversion.h>
|
#include <libxml/xmlversion.h>
|
||||||
#endif
|
#endif
|
||||||
#include <libxml/tree.h>
|
|
||||||
#include <libxml/parser.h>
|
|
||||||
#include <libxml/encoding.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -70,18 +67,6 @@ typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
|
|||||||
*/
|
*/
|
||||||
typedef int (*xmlInputCloseCallback) (void * context);
|
typedef int (*xmlInputCloseCallback) (void * context);
|
||||||
|
|
||||||
struct _xmlParserInputBuffer {
|
|
||||||
void* context;
|
|
||||||
xmlInputReadCallback readcallback;
|
|
||||||
xmlInputCloseCallback closecallback;
|
|
||||||
|
|
||||||
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
|
||||||
|
|
||||||
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
|
|
||||||
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Those are the functions and datatypes for the library output
|
* Those are the functions and datatypes for the library output
|
||||||
* I/O structures.
|
* I/O structures.
|
||||||
@ -128,6 +113,30 @@ typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
|
|||||||
*/
|
*/
|
||||||
typedef int (*xmlOutputCloseCallback) (void * context);
|
typedef int (*xmlOutputCloseCallback) (void * context);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <libxml/globals.h>
|
||||||
|
#include <libxml/tree.h>
|
||||||
|
#include <libxml/parser.h>
|
||||||
|
#include <libxml/encoding.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
struct _xmlParserInputBuffer {
|
||||||
|
void* context;
|
||||||
|
xmlInputReadCallback readcallback;
|
||||||
|
xmlInputCloseCallback closecallback;
|
||||||
|
|
||||||
|
xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
|
||||||
|
|
||||||
|
xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
|
||||||
|
xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
struct _xmlOutputBuffer {
|
struct _xmlOutputBuffer {
|
||||||
void* context;
|
void* context;
|
||||||
xmlOutputWriteCallback writecallback;
|
xmlOutputWriteCallback writecallback;
|
||||||
|
Reference in New Issue
Block a user