diff --git a/ChangeLog b/ChangeLog index 43544e921..8198eba06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-10-22 Rene Hexel + + * Source/Additions/GSXML.m: + In libxml2 the content and use fields have become private and are only + exposed through xmlBufContent() and xmlBufUse() since libxml-2.9.0. + Use those macros for newer versions of libxml2. + 2012-10-20 Richard Frith-Macdonald * Source/NSConnection.m: Use NSUInteger for array indexes/counters. diff --git a/Source/Additions/GSXML.m b/Source/Additions/GSXML.m index b85d3c93a..c45d32bf3 100644 --- a/Source/Additions/GSXML.m +++ b/Source/Additions/GSXML.m @@ -983,7 +983,11 @@ static NSMapTable *nodeNames = 0; 1, "utf-8"); xmlOutputBufferFlush(buf); +#if LIBXML_VERSION < 20900 string = UTF8StrLen(buf->buffer->content, buf->buffer->use); +#else + string = UTF8StrLen(xmlBufContent(buf->buffer), xmlBufUse(buf->buffer)); +#endif xmlOutputBufferClose(buf); } return string;