osx compatibility fixup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39122 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2015-11-02 18:10:38 +00:00
parent 3d55d782bd
commit 612c1f983c
3 changed files with 42 additions and 7 deletions

View file

@ -648,7 +648,6 @@ extern void ensure_oldNs(xmlNodePtr node);
// Check to make sure this is a valid addition...
NSAssert(nil != child, NSInvalidArgumentException);
NSAssert(index <= childCount, NSInvalidArgumentException);
NSAssert(nil == [child parent], NSInvalidArgumentException);
NSAssert(NSXMLAttributeKind != theKind, NSInvalidArgumentException);
NSAssert(NSXMLDTDKind != theKind, NSInvalidArgumentException);
NSAssert(NSXMLDocumentKind != theKind, NSInvalidArgumentException);
@ -658,6 +657,11 @@ extern void ensure_oldNs(xmlNodePtr node);
NSAssert(NSXMLNamespaceKind != theKind, NSInvalidArgumentException);
NSAssert(NSXMLNotationDeclarationKind != theKind, NSInvalidArgumentException);
if (nil != [child parent])
{
[child detach];
}
[self _insertChild: child atIndex: index];
}