Use accessor functions to manipulate xmlOutputBuffer
authorDodji Seketeli <dodji@redhat.com>
Thu, 9 Aug 2012 10:33:48 +0000 (10:33 +0000)
committerDodji Seketeli <dodji@gcc.gnu.org>
Thu, 9 Aug 2012 10:33:48 +0000 (12:33 +0200)
commit4531d13af5d28054528cad273fc1eee41104b0e3
tree5d2a00043b334a915e04702ccbf4a4c3e2b9150a
parent5100dfce9d75744aaa765884c07b7652a5fac3ab
Use accessor functions to manipulate xmlOutputBuffer

This is a fix to prepare the xmlj_io.c file of gnu classpath to a coming
API change in libxml2.

Basically, we were previously accessing fields inside the
xmlOutputBuffer struct of libxml2.  In a coming version of libxml2,
that won't be possible anymore.  Client code will have to use accessor
functions instead.  For the gory details, there is an interestin note
of Daniel Veillard (author of libxml2) at
https://mail.gnome.org/archives/desktop-devel-list/2012-August/msg00007.html.

This patch defines too accessor macros that, depending on the version
of libxml2 we are using will either access the fields of
xmlOutputBuffer directly, or use the new accessor function.

Tested on x86_64-unknown-linux-gnu against trunk.

libjava/classpath/

* native/jni/xmlj/xmlj_io.c (GET_XML_OUTPUT_BUFFER_CONTENT)
(GET_XML_OUTPUT_BUFFER_SIZE): New macros.
(xmljOutputWriteCallback): Use them.

From-SVN: r190249
libjava/classpath/ChangeLog
libjava/classpath/native/jni/xmlj/xmlj_io.c