mirror of
https://github.com/gnustep/libs-performance.git
synced 2025-02-21 10:51:15 +00:00
use always class_getInstanceSize() on GNUSTEP for all runtimes and define a compatibility macro for old macs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@31601 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6630d3d098
commit
6c465a5ec3
2 changed files with 10 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-11-11 Riccardo Mottola
|
||||
|
||||
* GSCache.m
|
||||
use always class_getInstanceSize() on GNUSTEP for all runtimes and define a compatibility macro for old macs
|
||||
|
||||
2010-11-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GSCache.m: Try to get defines right to get instance size depending
|
||||
|
|
10
GSCache.m
10
GSCache.m
|
@ -48,6 +48,9 @@
|
|||
|
||||
#if !defined(GNUSTEP)
|
||||
#include <objc/objc-class.h>
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
|
||||
#define class_getInstanceSize(isa) ((struct objc_class *)isa)->instance_size
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@interface GSCache (Threading)
|
||||
|
@ -757,11 +760,8 @@ static void removeItem(GSCacheItem *item, GSCacheItem **first)
|
|||
return 0;
|
||||
}
|
||||
[exclude addObject: self];
|
||||
#if defined(__OBJC2__) || defined(GNUSTEP)
|
||||
return class_getInstanceSize(isa);
|
||||
#else
|
||||
return ((struct objc_class *)isa)->instance_size;
|
||||
#endif
|
||||
|
||||
return class_getInstanceSize(isa);
|
||||
}
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue