OSX copmpatibility tweak.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39239 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2015-12-22 18:35:37 +00:00
parent cd9dfc915e
commit a725edd38b
3 changed files with 21 additions and 7 deletions

View file

@ -657,10 +657,16 @@ extern void ensure_oldNs(xmlNodePtr node);
NSAssert(NSXMLNamespaceKind != theKind, NSInvalidArgumentException);
NSAssert(NSXMLNotationDeclarationKind != theKind, NSInvalidArgumentException);
if (nil != [child parent])
{
[child detach];
}
/* On OSX we get NSInternalInconsistencyException if we try to add an element
* which is already a child of some other parent. So presumably we shouldn't
* be auto-removing...
*
* if (nil != [child parent])
* {
* [child detach];
* }
*/
NSAssert(nil == [child parent], NSInternalInconsistencyException);
[self _insertChild: child atIndex: index];
}