diff --git a/Headers/Foundation/NSXMLNode.h b/Headers/Foundation/NSXMLNode.h index 8a2102abf..51ef0ed90 100644 --- a/Headers/Foundation/NSXMLNode.h +++ b/Headers/Foundation/NSXMLNode.h @@ -75,6 +75,14 @@ typedef NSUInteger NSXMLNodeKind; // Output options // NSXMLNodePrettyPrint +/* This next class declaration is private for internal use by the base + * library developers ... it is present simply to make the compiler + * produce symbol information to be used when debugging. + */ +#if defined(GSInternal) +@class GSInternal; +#endif + /** * The most primitive unit in an XML document. */ @@ -89,10 +97,16 @@ typedef NSUInteger NSXMLNodeKind; * when we don't have the non-fragile ABI available. * Use this mechanism rather than changing the instance variable * layout (see Source/GSInternal.h for details). - * In this case it's declared protected so that the NSXMLNode - * subclasses can share the same variables. + * In this case, when compiled the variable is a protected class + * available so that the NSXMLNode subclasses within the base library + * can share the same variables, but when viewed from outside the + * base library itsself, it's an opaque pointer which must not be used. */ - @protected id _internal GS_UNUSED_IVAR; +# if defined(GSInternal) + @protected GSInternal *_internal GS_UNUSED_IVAR; +# else + @private id _internal GS_UNUSED_IVAR; +# endif #endif } diff --git a/Source/NSXMLDTD.m b/Source/NSXMLDTD.m index 06217af9b..5d8d02a7d 100644 --- a/Source/NSXMLDTD.m +++ b/Source/NSXMLDTD.m @@ -24,10 +24,9 @@ #import "common.h" -#import "NSXMLPrivate.h" - #define GSInternal NSXMLDTDInternal -#include "GSInternal.h" +#import "NSXMLPrivate.h" +#import "GSInternal.h" GS_PRIVATE_INTERNAL(NSXMLDTD) @implementation NSXMLDTD diff --git a/Source/NSXMLDTDNode.m b/Source/NSXMLDTDNode.m index c1ecb9b1d..ad48b9ef5 100644 --- a/Source/NSXMLDTDNode.m +++ b/Source/NSXMLDTDNode.m @@ -24,10 +24,9 @@ #import "common.h" -#import "NSXMLPrivate.h" - #define GSInternal NSXMLDTDNodeInternal -#include "GSInternal.h" +#import "NSXMLPrivate.h" +#import "GSInternal.h" GS_PRIVATE_INTERNAL(NSXMLDTDNode) @implementation NSXMLDTDNode diff --git a/Source/NSXMLDocument.m b/Source/NSXMLDocument.m index 9ff22616a..2a9eb2330 100644 --- a/Source/NSXMLDocument.m +++ b/Source/NSXMLDocument.m @@ -24,10 +24,9 @@ #import "common.h" -#import "NSXMLPrivate.h" - #define GSInternal NSXMLDocumentInternal -#include "GSInternal.h" +#import "NSXMLPrivate.h" +#import "GSInternal.h" GS_PRIVATE_INTERNAL(NSXMLDocument) #import diff --git a/Source/NSXMLElement.m b/Source/NSXMLElement.m index 7291cccb0..eb493d5ef 100644 --- a/Source/NSXMLElement.m +++ b/Source/NSXMLElement.m @@ -24,10 +24,9 @@ #import "common.h" -#import "NSXMLPrivate.h" - #define GSInternal NSXMLElementInternal -#include "GSInternal.h" +#import "NSXMLPrivate.h" +#import "GSInternal.h" GS_PRIVATE_INTERNAL(NSXMLElement) @implementation NSXMLElement diff --git a/Source/NSXMLNode.m b/Source/NSXMLNode.m index 96ea7e399..f48555b67 100644 --- a/Source/NSXMLNode.m +++ b/Source/NSXMLNode.m @@ -24,10 +24,9 @@ #import "common.h" -#import "NSXMLPrivate.h" - #define GSInternal NSXMLNodeInternal -#include "GSInternal.h" +#import "NSXMLPrivate.h" +#import "GSInternal.h" GS_PRIVATE_INTERNAL(NSXMLNode)