mirror of
https://github.com/GNOME/libxml2.git
synced 2025-02-17 18:19:32 +08: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:
parent
75794826e0
commit
a8a89fe587
@ -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>
|
||||
|
||||
* configure.in: applied an IEEE flag patch for OSF/1 #77825
|
||||
|
@ -205,8 +205,13 @@ if test "$with_python" != "no" ; then
|
||||
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)
|
||||
if test -x "$with_python"
|
||||
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
|
||||
if test "$PYTHON" != ""
|
||||
then
|
||||
|
@ -147,7 +147,7 @@ base</a>:</p>
|
||||
</gjob:Jobs>
|
||||
</gjob:Helping></pre>
|
||||
<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>
|
||||
<p>The suggested principle is to be tolerant with respect to the input
|
||||
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
|
||||
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
|
||||
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
|
||||
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>
|
||||
|
@ -226,6 +226,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
|
||||
|
||||
|
||||
|
||||
|
||||
} </pre>
|
||||
</li>
|
||||
<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>
|
||||
<ol>
|
||||
<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
|
||||
xmlMallocBreakpoint() a specific function called when this precise block
|
||||
is allocated</li>
|
||||
@ -178,7 +182,10 @@ possible to find more easilly:</p>
|
||||
</ol>
|
||||
<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
|
||||
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>
|
||||
<p>How much libxml memory require ? It's hard to tell in average it depends
|
||||
of a number of things:</p>
|
||||
|
@ -17,9 +17,6 @@
|
||||
#else
|
||||
#include <libxml/xmlversion.h>
|
||||
#endif
|
||||
#include <libxml/tree.h>
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/encoding.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -70,18 +67,6 @@ typedef int (*xmlInputReadCallback) (void * context, char * buffer, int len);
|
||||
*/
|
||||
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
|
||||
* I/O structures.
|
||||
@ -128,6 +113,30 @@ typedef int (*xmlOutputWriteCallback) (void * context, const char * buffer,
|
||||
*/
|
||||
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 {
|
||||
void* context;
|
||||
xmlOutputWriteCallback writecallback;
|
||||
|
Loading…
Reference in New Issue
Block a user