When building outside GNUstep (additions for apple), include the runtime

declarations and fix error in casting self.
This commit is contained in:
Richard Frith-Macdonald 2020-04-14 17:18:24 +01:00
parent fc0c0da188
commit 53f5957030

View file

@ -327,6 +327,10 @@ handleExit()
#else
#if __has_include(<objc/runtime.h>)
# include <objc/runtime.h>
#endif
@implementation NSObject (MemoryFootprint)
+ (NSUInteger) contentSizeOf: (NSObject*)obj
excluding: (NSHashTable*)exclude
@ -412,7 +416,9 @@ handleExit()
NSUInteger size;
#if GS_SIZEOF_VOIDP > 4
if ((((NSUInteger)void*)self) & 0x07)
NSUInteger xxx = (NSUInteger)(void*)self;
if (xxx & 0x07)
{
return 0; // Small object has no size
}