mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 18:21:04 +00:00
* Source/NSXMLNode.m (-XMLStringWithOptions:): Use macros for
versions of libxml2. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
42556c0e4a
commit
039f6e512f
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-12-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSXMLNode.m (-XMLStringWithOptions:): Use macros for
|
||||||
|
versions of libxml2.
|
||||||
|
|
||||||
2012-11-28 Richard Frith-Macdonald <rfm@gnu.org>
|
2012-11-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* configure.ac: Fixup ICU test error
|
* configure.ac: Fixup ICU test error
|
||||||
|
|
|
@ -1981,10 +1981,8 @@ execute_xpath(xmlNodePtr node, NSString *xpath_exp, NSDictionary *constants,
|
||||||
- (NSString*) XMLStringWithOptions: (NSUInteger)theOptions
|
- (NSString*) XMLStringWithOptions: (NSUInteger)theOptions
|
||||||
{
|
{
|
||||||
NSString *string = nil;
|
NSString *string = nil;
|
||||||
xmlChar *buf = NULL;
|
|
||||||
xmlBufferPtr buffer;
|
xmlBufferPtr buffer;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int len = 0;
|
|
||||||
int xmlOptions = 0;
|
int xmlOptions = 0;
|
||||||
|
|
||||||
buffer = xmlBufferCreate();
|
buffer = xmlBufferCreate();
|
||||||
|
@ -2037,9 +2035,11 @@ execute_xpath(xmlNodePtr node, NSString *xpath_exp, NSDictionary *constants,
|
||||||
xmlBufferFree(buffer);
|
xmlBufferFree(buffer);
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
buf = buffer->content;
|
#if LIBXML_VERSION < 20900
|
||||||
len = buffer->use;
|
string = StringFromXMLString(buffer->content, buffer->use);
|
||||||
string = StringFromXMLString(buf, len);
|
#else
|
||||||
|
string = StringFromXMLString(xmlBufContent(buffer), xmlBufUse(buffer));
|
||||||
|
#endif
|
||||||
xmlBufferFree(buffer);
|
xmlBufferFree(buffer);
|
||||||
|
|
||||||
if ([self kind] == NSXMLTextKind)
|
if ([self kind] == NSXMLTextKind)
|
||||||
|
|
Loading…
Reference in a new issue