Monotone-Parent: 0736f4d4ec3208b934e9888e6cf09014b905774b

Monotone-Revision: 3541b0465209c659178d752da6f97c5063fbc108

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-04-19T21:49:11
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-04-19 21:49:11 +00:00
parent dd78ce2dcb
commit d7df3cfb57
3 changed files with 12 additions and 7 deletions

View File

@@ -23,12 +23,12 @@
#import <Foundation/NSMapTable.h>
#import <NGExtensions/NGLogger.h>
const IMP *
const MAPIStorePropertyGetter *
MAPIStorePropertyGettersForClass (Class klass)
{
static NSMapTable *classesTable = nil;
IMP *getters;
IMP getter;
MAPIStorePropertyGetter *getters;
MAPIStorePropertyGetter getter;
uint16_t count, idx;
SEL currentSel;
@@ -40,7 +40,7 @@ MAPIStorePropertyGettersForClass (Class klass)
getters = NSMapGet (classesTable, klass);
if (!getters)
{
getters = NSZoneCalloc (NULL, 65536, sizeof (IMP));
getters = NSZoneCalloc (NULL, 65536, sizeof (MAPIStorePropertyGetter));
for (count = 0; count < 65535; count++)
{
idx = MAPIStorePropertyGettersIdx[count];
@@ -49,7 +49,8 @@ MAPIStorePropertyGettersForClass (Class klass)
currentSel = MAPIStorePropertyGetterSelectors[idx];
if ([klass instancesRespondToSelector: currentSel])
{
getter = [klass instanceMethodForSelector: currentSel];
getter = (MAPIStorePropertyGetter)
[klass instanceMethodForSelector: currentSel];
if (getter)
getters[count] = getter;
}