mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
When building outside GNUstep (additions for apple), include the runtime
declarations and fix error in casting self.
This commit is contained in:
parent
fc0c0da188
commit
53f5957030
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue