mirror of
https://github.com/gnustep/libs-performance.git
synced 2025-02-24 04:11:19 +00:00
attempt tweak to avoid clang/llvm problem
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/performance/trunk@33794 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
03479ac8b8
commit
c0888bae6e
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-08-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GSCache.m: Try to fool clang/llvm to avoid useless warning/error.
|
||||
|
||||
2011-08-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* GSFIFO.h:
|
||||
|
|
|
@ -96,6 +96,7 @@
|
|||
|
||||
static NSHashTable *allCaches = 0;
|
||||
static NSLock *allCachesLock = nil;
|
||||
static int itemOffset = 0;
|
||||
|
||||
typedef struct {
|
||||
id delegate;
|
||||
|
@ -114,7 +115,7 @@ typedef struct {
|
|||
NSMutableSet *exclude;
|
||||
NSRecursiveLock *lock;
|
||||
} Item;
|
||||
#define my ((Item*)&self[1])
|
||||
#define my ((Item*)((void*)self + itemOffset))
|
||||
|
||||
/*
|
||||
* Add item to linked list starting at *first
|
||||
|
@ -201,6 +202,7 @@ static void removeItem(GSCacheItem *item, GSCacheItem **first)
|
|||
{
|
||||
if (allCaches == 0)
|
||||
{
|
||||
itemOffset = class_getInstanceSize(self);
|
||||
allCaches
|
||||
= NSCreateHashTable(NSNonRetainedObjectHashCallBacks, 0);
|
||||
if ([NSThread isMultiThreaded] == YES)
|
||||
|
|
Loading…
Reference in a new issue