* EOAccess/EOPrivate.h, EOAccess/EOPrivate.m,

* EOAccess/EODatabaseContext.m, EOAccess/EOSQLExpression.m,
        * EOControl/EOEditingContext.m, EOControl/EOKeyValueCoding.m,
        * EOControl/EOMutableKnownKeyDictionary.m,
        * EOControl/EOPrivate.h, EOControl/EOPrivate.m: Remove global
        selector cache.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@20766 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Ayers 2005-02-20 20:33:09 +00:00
parent 944432d46e
commit 2fb344f062
10 changed files with 216 additions and 387 deletions

View file

@ -39,6 +39,13 @@
* EOControl/GNUmakefile: Build EOPrivate.m instead of EOPriv.m.
Do not install private header.
* EOAccess/EOPrivate.h, EOAccess/EOPrivate.m,
* EOAccess/EODatabaseContext.m, EOAccess/EOSQLExpression.m,
* EOControl/EOEditingContext.m, EOControl/EOKeyValueCoding.m,
* EOControl/EOMutableKnownKeyDictionary.m,
* EOControl/EOPrivate.h, EOControl/EOPrivate.m: Remove global
selector cache.
2005-02-19 David Ayers <d.ayers@inode.at>
* EOAdaptors/Postgres95/Postgres95Private.m/h: New files

View file

@ -417,7 +417,7 @@ static Class _contextClass = Nil;
if (count>0)
{
int i = 0;
IMP oaiIMP=[_registeredChannels methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[_registeredChannels methodForSelector: @selector(objectAtIndex:)];
for (i = 0 ; !busy && i < count; i++)
{
@ -441,7 +441,7 @@ static Class _contextClass = Nil;
if (count>0)
{
IMP oaiIMP=[_registeredChannels methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[_registeredChannels methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < count; i++)
[array addObject: [GDL2ObjectAtIndexWithImp(_registeredChannels,oaiIMP,i)
@ -470,7 +470,7 @@ static Class _contextClass = Nil;
int count= [_registeredChannels count];
if (count>0)
{
IMP oaiIMP=[_registeredChannels methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[_registeredChannels methodForSelector: @selector(objectAtIndex:)];
for (i = count - 1; i >= 0; i--)
{
@ -922,7 +922,7 @@ userInfo = {
if (count>0)
{
IMP oaiIMP=[updatedObjects methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[updatedObjects methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < count; i++)
{
@ -1018,8 +1018,8 @@ userInfo = {
[EOFault clearFault: relationshipValue];
// Be carefull: Never call methodForSelector before clearing fault !
addObjectIMP=[relationshipValue methodForSelector:GDL2_addObjectSEL];
oaiIMP=[sourceSnapshot methodForSelector: GDL2_objectAtIndexSEL];
addObjectIMP=[relationshipValue methodForSelector:@selector(addObject:)];
oaiIMP=[sourceSnapshot methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < sourceSnapshotCount; i++)
@ -1449,23 +1449,21 @@ userInfo = {
NS_DURING
{
SEL fetchObjectSEL=@selector(fetchObject);
IMP channelFetchObjectIMP=
[channel methodForSelector:fetchObjectSEL];
[channel methodForSelector:@selector(fetchObject)];
IMP arrayAddObjectIMP=
[array methodForSelector:GDL2_addObjectSEL];
[array methodForSelector:@selector(addObject:)];
GDL2IMP_UINT arrayIndexOfObjectIdenticalToIMP=
(GDL2IMP_UINT)[array methodForSelector:GDL2_indexOfObjectIdenticalToSEL];
(GDL2IMP_UINT)[array methodForSelector:@selector(indexOfObjectIdenticalTo:)];
arp = GDL2NSAutoreleasePool_new();
NSDebugMLLog(@"EODatabaseContext",
@"[channel isFetchInProgress]=%s",
([channel isFetchInProgress] ? "YES" : "NO"));
while ((obj = (*channelFetchObjectIMP)(channel,fetchObjectSEL)))
while ((obj = (*channelFetchObjectIMP)(channel,@selector(fetchObject))))
{
NSDebugMLLog(@"EODatabaseContext",
@"fetched an object");
@ -1592,23 +1590,15 @@ userInfo = {
EOAdaptorChannel *adaptorChannel = nil;
IMP channelFetchRowWithZoneIMP=NULL;
SEL fetchRowWithZoneSEL=@selector(fetchRowWithZone:);
SEL globalIDForRowSEL=@selector(globalIDForRow:);
IMP entityGlobalIDForRowIMP=[entity methodForSelector:globalIDForRowSEL];
SEL recordSnapshotForGlobalIDSEL=@selector(recordSnapshot:forGlobalID:);
IMP databaseRecordSnapshotForGlobalID=[_database methodForSelector:recordSnapshotForGlobalIDSEL];
IMP entityGlobalIDForRowIMP=[entity methodForSelector:@selector(globalIDForRow:)];
IMP databaseRecordSnapshotForGlobalID=[_database methodForSelector:@selector(recordSnapshot:forGlobalID:)];
IMP cacheAddObjectIMP=NULL;
channel = [self availableChannel];
adaptorChannel = [channel adaptorChannel];
channelFetchRowWithZoneIMP=
[adaptorChannel methodForSelector:fetchRowWithZoneSEL];
[adaptorChannel methodForSelector:@selector(fetchRowWithZone:)];
if (_flags.beganTransaction == NO
&& _updateStrategy == EOUpdateWithPessimisticLocking)
@ -1631,18 +1621,18 @@ userInfo = {
entity: entity];
cache = [NSMutableArray arrayWithCapacity: 16];
cacheAddObjectIMP=[cache methodForSelector:GDL2_addObjectSEL];
cacheAddObjectIMP=[cache methodForSelector:@selector(addObject:)];
while ((row = (*channelFetchRowWithZoneIMP)
(adaptorChannel,fetchRowWithZoneSEL,NULL)))
(adaptorChannel,@selector(fetchRowWithZone:),NULL)))
{
NSDebugMLLog(@"EODatabaseContext", @"row=%@", row);
gid = (*entityGlobalIDForRowIMP)(entity,globalIDForRowSEL,row);
gid = (*entityGlobalIDForRowIMP)(entity,@selector(globalIDForRow:),row);
NSDebugMLLog(@"EODatabaseContext", @"gid=%@", gid);
(*databaseRecordSnapshotForGlobalID)
(_database,recordSnapshotForGlobalIDSEL,row,gid);
(_database,@selector(recordSnapshot:forGlobalID:),row,gid);
GDL2AddObjectWithImp(cache,cacheAddObjectIMP,gid);
}
@ -1657,21 +1647,20 @@ userInfo = {
if ([cache count]>0)
{
IMP arrayAddObjectIMP=
[array methodForSelector:GDL2_addObjectSEL];
[array methodForSelector:@selector(addObject:)];
GDL2IMP_UINT arrayIndexOfObjectIdenticalToIMP=
(GDL2IMP_UINT)[array methodForSelector:GDL2_indexOfObjectIdenticalToSEL];
(GDL2IMP_UINT)[array methodForSelector:@selector(indexOfObjectIdenticalTo:)];
NSEnumerator *cacheEnum = [cache objectEnumerator];
IMP cacheEnumNextObjectIMP=[cacheEnum methodForSelector:GDL2_nextObjectSEL];
IMP cacheEnumNextObjectIMP=[cacheEnum methodForSelector:@selector(nextObject)];
EOClassDescription* classDescriptionForInstances=
[entity classDescriptionForInstances];
SEL evaluateWithObjectSEL=@selector(evaluateWithObject:);
GDL2IMP_BOOL qualifierEvaluateWithObjectIMP=
(GDL2IMP_BOOL)[qualifier methodForSelector:evaluateWithObjectSEL];
(GDL2IMP_BOOL)[qualifier methodForSelector:@selector(evaluateWithObject:)];
IMP ecObjectForGlobalIDIMP=NULL;
IMP ecRecordObjectGlobalIDIMP=NULL;
@ -1684,7 +1673,7 @@ userInfo = {
if (snapshot)
{
if (!qualifier
|| (*qualifierEvaluateWithObjectIMP)(qualifier,evaluateWithObjectSEL,snapshot) == YES)
|| (*qualifierEvaluateWithObjectIMP)(qualifier,@selector(evaluateWithObject:),snapshot) == YES)
{
obj = EOEditingContext_objectForGlobalIDWithImpPtr(context,&ecObjectForGlobalIDIMP,gid);
@ -1804,16 +1793,14 @@ userInfo = {
NS_DURING
{
SEL fetchObjectSEL=@selector(fetchObject);
IMP channelFetchObjectIMP=
[channel methodForSelector:fetchObjectSEL];
[channel methodForSelector:@selector(fetchObject)];
IMP arrayAddObjectIMP=
[array methodForSelector:GDL2_addObjectSEL];
[array methodForSelector:@selector(addObject:)];
GDL2IMP_UINT arrayIndexOfObjectIdenticalToIMP=
(GDL2IMP_UINT)[array methodForSelector:GDL2_indexOfObjectIdenticalToSEL];
(GDL2IMP_UINT)[array methodForSelector:@selector(indexOfObjectIdenticalTo:)];
arp = GDL2NSAutoreleasePool_new();
@ -1822,7 +1809,7 @@ userInfo = {
([channel isFetchInProgress]
? "YES" : "NO"));
while ((obj = (*channelFetchObjectIMP)(channel,fetchObjectSEL)))
while ((obj = (*channelFetchObjectIMP)(channel,@selector(fetchObject))))
{
NSDebugMLLog(@"EODatabaseContext",
@"fetched an object");
@ -2274,7 +2261,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
count = [classProperties count];
if (count>0)
{
IMP oaiIMP=[classProperties methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[classProperties methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < count; i++)
{
@ -2361,7 +2348,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
count = [array count];
if (count>0)
{
IMP oaiIMP=[array methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[array methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < count; i++)
{
@ -2459,7 +2446,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
if (count>0)
{
IMP oaiIMP=[objects[which] methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[objects[which] methodForSelector: @selector(objectAtIndex:)];
int i = 0;
// For each object
@ -2530,7 +2517,7 @@ forDatabaseOperation:(EODatabaseOperation *)op
object,relationships);
relationshipsCount = [relationships count];
relObjectAtIndexIMP=[relationships methodForSelector: GDL2_objectAtIndexSEL];
relObjectAtIndexIMP=[relationships methodForSelector: @selector(objectAtIndex:)];
if (which == 1) //delete //Not in insert //not in update
{
@ -2759,8 +2746,8 @@ forDatabaseOperation:(EODatabaseOperation *)op
{
int iValue;
NSMutableArray *valuesGIDs = [NSMutableArray array];
IMP valuesGIDsAddObjectIMP=[valuesGIDs methodForSelector:GDL2_addObjectSEL];
IMP svObjectAtIndexIMP=[relationshipSnapshotValue methodForSelector: GDL2_objectAtIndexSEL];
IMP valuesGIDsAddObjectIMP=[valuesGIDs methodForSelector:@selector(addObject:)];
IMP svObjectAtIndexIMP=[relationshipSnapshotValue methodForSelector: @selector(objectAtIndex:)];
for (iValue = 0;
iValue < newValuesCount;
@ -3742,7 +3729,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (destinationKeysCount>0)
{
IMP oaiIMP=[destinationKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[destinationKeys methodForSelector: @selector(objectAtIndex:)];
for (i = 0 ;i < destinationKeysCount; i++)
{
@ -3788,7 +3775,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (destinationObjectsCount > 0)
{
int i;
IMP oaiIMP=[destinationObjects methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[destinationObjects methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < destinationObjectsCount; i++)
{
@ -3825,7 +3812,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (destinationObjectsCount > 0)
{
int i;
IMP oaiIMP=[destinationObjects methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[destinationObjects methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < destinationObjectsCount; i++)
{
@ -3904,8 +3891,8 @@ Raises an exception is the adaptor is unable to perform the operations.
if (foreignKeyInDestination || [relationship propagatesPrimaryKey])
{
IMP srcObjectAIndexIMP=[sourceKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP dstObjectAIndexIMP=[destinationKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP srcObjectAIndexIMP=[sourceKeys methodForSelector: @selector(objectAtIndex:)];
IMP dstObjectAIndexIMP=[destinationKeys methodForSelector: @selector(objectAtIndex:)];
relayedValues = AUTORELEASE([[sourceNewRow valuesForKeys: sourceKeys]
mutableCopy]);// {code = 0; }
@ -3945,8 +3932,8 @@ Raises an exception is the adaptor is unable to perform the operations.
{
//Verify !!
NSDictionary *destinationValues;
IMP srcObjectAIndexIMP=[sourceKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP dstObjectAIndexIMP=[destinationKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP srcObjectAIndexIMP=[sourceKeys methodForSelector: @selector(objectAtIndex:)];
IMP dstObjectAIndexIMP=[destinationKeys methodForSelector: @selector(objectAtIndex:)];
NSDebugMLLog(@"EODatabaseContext",
@"Call valuesForKeys destinationObject (%p-<%@>)",
@ -4236,7 +4223,7 @@ Raises an exception is the adaptor is unable to perform the operations.
[object debugDictionaryDescription]);*/
if (propNamesCount>0)
{
IMP oaiIMP=[classPropertyNames methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[classPropertyNames methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < propNamesCount; i++)
{
@ -4284,7 +4271,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (snapKeyCount>0)
{
IMP oaiIMP=[dbSnapshotKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[dbSnapshotKeys methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < snapKeyCount; i++)
{
id key = GDL2ObjectAtIndexWithImp(dbSnapshotKeys,oaiIMP,i);
@ -4361,7 +4348,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[values methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[values methodForSelector: @selector(objectAtIndex:)];
for (i = 0; nullPKValues && i < count; i++)
nullPKValues = _isNilOrEONull(GDL2ObjectAtIndexWithImp(values,oaiIMP,i));
@ -4416,7 +4403,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[relationships methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[relationships methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < count; i++)
{
@ -4473,7 +4460,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (valueValuesCount>0)
{
int iValueValue = 0;
IMP vObjectAtIndexIMP=[value methodForSelector: GDL2_objectAtIndexSEL];
IMP vObjectAtIndexIMP=[value methodForSelector: @selector(objectAtIndex:)];
for (iValueValue = 0;
iValueValue < valueValuesCount;
@ -4862,8 +4849,8 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
int i=0;
IMP attributesAddObjectIMP=[attributes methodForSelector:GDL2_addObjectSEL];
IMP attributesToSaveObjectAtIndexIMP=[attributesToSave methodForSelector:GDL2_objectAtIndexSEL];
IMP attributesAddObjectIMP=[attributes methodForSelector:@selector(addObject:)];
IMP attributesToSaveObjectAtIndexIMP=[attributesToSave methodForSelector:@selector(objectAtIndex:)];
for (i = 0; i < count; i++)
{
@ -4928,7 +4915,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[dbOpeAdaptorOperations methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[dbOpeAdaptorOperations methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -4962,8 +4949,8 @@ Raises an exception is the adaptor is unable to perform the operations.
if (entitiesCount>0)
{
IMP entityObjectAtIndexIMP=[entityNameOrderingArray methodForSelector: GDL2_objectAtIndexSEL];
IMP opeObjectAtIndexIMP=[adaptorOperations methodForSelector: GDL2_objectAtIndexSEL];
IMP entityObjectAtIndexIMP=[entityNameOrderingArray methodForSelector: @selector(objectAtIndex:)];
IMP opeObjectAtIndexIMP=[adaptorOperations methodForSelector: @selector(objectAtIndex:)];
int iEntity=0;
for (iEntity = 0; iEntity < entitiesCount; iEntity++)
@ -5008,7 +4995,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[relationships methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[relationships methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -5092,7 +5079,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[entities methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[entities methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -5173,7 +5160,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[attributes methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[attributes methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -5218,7 +5205,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[attributes methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[attributes methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -5260,7 +5247,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[attributes methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[attributes methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -5313,7 +5300,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[array methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[array methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -5482,7 +5469,7 @@ Raises an exception is the adaptor is unable to perform the operations.
int count = [attributes count];
if (count>0)
{
IMP oaiIMP=[attributes methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[attributes methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
@ -5559,7 +5546,7 @@ Raises an exception is the adaptor is unable to perform the operations.
qualifierArray = GDL2MutableArray();
valuesArray = GDL2MutableArray();
toManySnapshotArray = GDL2MutableArray();
toManySnapArrayObjectAtIndexIMP=[toManySnapshotArray methodForSelector: GDL2_objectAtIndexSEL];
toManySnapArrayObjectAtIndexIMP=[toManySnapshotArray methodForSelector: @selector(objectAtIndex:)];
relationshipName = [relationship name];
objsEnum = [objects objectEnumerator];
@ -5603,7 +5590,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[valuesArray methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[valuesArray methodForSelector: @selector(objectAtIndex:)];
objsEnum = [array objectEnumerator];
objsEnumNO=NULL;
@ -6298,7 +6285,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (snapshotsDictCount>0)
{
int i = 0;
IMP oaiIMP=[_uniqueStack methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[_uniqueStack methodForSelector: @selector(objectAtIndex:)];
for (i = 0; !snapshot && i < snapshotsDictCount; i++)
{
@ -6366,7 +6353,7 @@ Raises an exception is the adaptor is unable to perform the operations.
n = [_uniqueStack count];
if (n>0)
{
IMP oaiIMP=[_uniqueStack methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[_uniqueStack methodForSelector: @selector(objectAtIndex:)];
for (i=0; i<n; i++)
{
@ -6378,7 +6365,7 @@ Raises an exception is the adaptor is unable to perform the operations.
n = [_uniqueArrayStack count];
if (n>0)
{
IMP oaiIMP=[_uniqueArrayStack methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[_uniqueArrayStack methodForSelector: @selector(objectAtIndex:)];
for (i=0; i<n; i++)
{
@ -6390,7 +6377,7 @@ Raises an exception is the adaptor is unable to perform the operations.
n = [_deleteStack count];
if (n>0)
{
IMP oaiIMP=[_deleteStack methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[_deleteStack methodForSelector: @selector(objectAtIndex:)];
for (i=0; i<n; i++)
{
snapshots = GDL2ObjectAtIndexWithImp(_deleteStack,oaiIMP,i);
@ -6428,7 +6415,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[keys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[keys methodForSelector: @selector(objectAtIndex:)];
int i = 0;
for (i = 0; i < count; i++)
@ -6505,12 +6492,12 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
int i=0;
IMP oaiIMP=[classPropertyAttributeNames methodForSelector:GDL2_objectAtIndexSEL];
IMP oaiIMP=[classPropertyAttributeNames methodForSelector:@selector(objectAtIndex:)];
NSAssert(!_isFault(object),
@"Object is a fault. call -methodForSelector: on it is a bad idea");
objectTakeStoredValueForKeyIMP=[object methodForSelector:GDL2_takeStoredValueForKeySEL];
objectTakeStoredValueForKeyIMP=[object methodForSelector:@selector(takeStoredValue:forKey:)];
for (i = 0; i < count; i++)
{
@ -6542,14 +6529,14 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
int i=0;
IMP oaiIMP=[relationships methodForSelector:GDL2_objectAtIndexSEL];
IMP oaiIMP=[relationships methodForSelector:@selector(objectAtIndex:)];
if (!objectTakeStoredValueForKeyIMP)
{
NSAssert(!_isFault(object),
@"Object is a fault. call -methodForSelector: on it is a bad idea");
objectTakeStoredValueForKeyIMP=[object methodForSelector:GDL2_takeStoredValueForKeySEL];
objectTakeStoredValueForKeyIMP=[object methodForSelector:@selector(takeStoredValue:forKey:)];
};
for (i = 0; i < count; i++)
@ -6692,7 +6679,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (n>0)
{
IMP oaiIMP=[gids methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[gids methodForSelector: @selector(objectAtIndex:)];
unsigned i = 0;
for (i=0; i<n; i++)
@ -7097,7 +7084,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (relationshipsCount>0)
{
IMP oaiIMP=[relationships methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[relationships methodForSelector: @selector(objectAtIndex:)];
int i = 0;
for (i = 0; i < relationshipsCount; i++)
@ -7216,7 +7203,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP oaiIMP=[objects[which] methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[objects[which] methodForSelector: @selector(objectAtIndex:)];
int i = 0;
for (i = 0; i < count; i++)
@ -7250,7 +7237,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (relationshipsCount>0)
{
IMP relObjectAtIndexIMP=[relationships methodForSelector: GDL2_objectAtIndexSEL];
IMP relObjectAtIndexIMP=[relationships methodForSelector: @selector(objectAtIndex:)];
int iRelationship = 0;
for (iRelationship = 0;
@ -7285,7 +7272,7 @@ Raises an exception is the adaptor is unable to perform the operations.
if (count>0)
{
IMP destAttrsObjectAtIndexIMP=[relationships methodForSelector: GDL2_objectAtIndexSEL];
IMP destAttrsObjectAtIndexIMP=[relationships methodForSelector: @selector(objectAtIndex:)];
int i=0;
for (i = 0; i < count; i++)
{

View file

@ -36,10 +36,6 @@
GDL2ACCESS_EXPORT Class GDL2EODatabaseContextClass;
GDL2ACCESS_EXPORT Class GDL2EOAttributeClass;
// ==== Selectors =====
GDL2ACCESS_EXPORT SEL GDL2_snapshotForGlobalIDSEL;
GDL2ACCESS_EXPORT SEL GDL2__globalIDForObjectSEL;
// ==== IMPs ====
GDL2ACCESS_EXPORT IMP GDL2EODatabaseContext_snapshotForGlobalIDIMP;
GDL2ACCESS_EXPORT IMP GDL2EODatabaseContext__globalIDForObjectIMP;

View file

@ -51,10 +51,6 @@ RCS_ID("$Id$")
Class GDL2EODatabaseContextClass=Nil;
Class GDL2EOAttributeClass=Nil;
// ==== Selectors =====
SEL GDL2_snapshotForGlobalIDSEL;
SEL GDL2__globalIDForObjectSEL;
// ==== IMPs ====
IMP GDL2EODatabaseContext_snapshotForGlobalIDIMP=NULL;
IMP GDL2EODatabaseContext__globalIDForObjectIMP=NULL;
@ -67,17 +63,13 @@ void GDL2_EOAccessPrivateInit()
{
GDL2PrivInit();
// ==== Selectors =====
GDL2_snapshotForGlobalIDSEL = @selector(snapshotForGlobalID:);
GDL2__globalIDForObjectSEL = @selector(_globalIDForObject:);
// ==== Classes ====
GDL2EODatabaseContextClass = [EODatabaseContext class];
GDL2EOAttributeClass = [EOAttribute class];
GDL2EODatabaseContext_snapshotForGlobalIDIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:GDL2_snapshotForGlobalIDSEL];
GDL2EODatabaseContext_snapshotForGlobalIDIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:@selector(snapshotForGlobalID:)];
GDL2EODatabaseContext__globalIDForObjectIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:GDL2__globalIDForObjectSEL];
GDL2EODatabaseContext__globalIDForObjectIMP=[GDL2EODatabaseContextClass instanceMethodForSelector:@selector(_globalIDForObject:)];
};
}
@ -99,11 +91,11 @@ EODatabaseContext_snapshotForGlobalIDWithImpPtr(EODatabaseContext* dbContext,
&& GDL2EODatabaseContext_snapshotForGlobalIDIMP)
imp=GDL2EODatabaseContext_snapshotForGlobalIDIMP;
else
imp=[dbContext methodForSelector:GDL2_snapshotForGlobalIDSEL];
imp=[dbContext methodForSelector:@selector(snapshotForGlobalID:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(dbContext,GDL2_snapshotForGlobalIDSEL,gid);
return (*imp)(dbContext,@selector(snapshotForGlobalID:),gid);
}
else
return nil;
@ -122,11 +114,11 @@ EOGlobalID* EODatabaseContext_globalIDForObjectWithImpPtr(EODatabaseContext* dbC
&& GDL2EODatabaseContext__globalIDForObjectIMP)
imp=GDL2EODatabaseContext__globalIDForObjectIMP;
else
imp=[dbContext methodForSelector:GDL2__globalIDForObjectSEL];
imp=[dbContext methodForSelector:@selector(_globalIDForObject:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(dbContext,GDL2__globalIDForObjectSEL,object);
return (*imp)(dbContext,@selector(_globalIDForObject:),object);
}
else
return nil;

View file

@ -370,7 +370,7 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
GDL2AppendStringWithImp(entitiesString,
entitiesStringAppendStringIMP,@", ");
else
entitiesStringAppendStringIMP = [entitiesString methodForSelector:GDL2_appendStringSEL];
entitiesStringAppendStringIMP = [entitiesString methodForSelector:@selector(appendString:)];
if ([relationshipPath isEqualToString: @""])
{
@ -1272,7 +1272,7 @@ NSString *EOBindVariableColumnKey = @"EOBindVariableColumnKey";
char *s;
NSMutableString *str = [NSMutableString stringWithCapacity:
[format length]];
IMP appendStringIMP = [str methodForSelector:GDL2_appendStringSEL];
IMP appendStringIMP = [str methodForSelector:@selector(appendString:)];
while ((s = strchr(p, '%')))
{
@ -2095,7 +2095,7 @@ else if([anAttribute isDerived] == YES)
const char *s, *p, *init = [pattern cString];
NSMutableString *str = [NSMutableString stringWithCapacity:
patternLength];
IMP appendStringIMP = [str methodForSelector:GDL2_appendStringSEL];
IMP appendStringIMP = [str methodForSelector:@selector(appendString:)];
for (s = p = init; *s; s++)
{
@ -2167,7 +2167,7 @@ else if([anAttribute isDerived] == YES)
const char *s, *p, *init = [pattern cString];
NSMutableString *str = [NSMutableString stringWithCapacity:
[pattern length]];
IMP appendStringIMP = [str methodForSelector:GDL2_appendStringSEL];
IMP appendStringIMP = [str methodForSelector:@selector(appendString:)];
for (s = p = init; *s; s++)
{
@ -2534,7 +2534,7 @@ NSString *EODropDatabaseKey = @"EODropDatabaseKey";
@implementation EOSQLExpression (EOSchemaGeneration)
+ (NSArray *)_administrativeDatabaseStatementsForSelector:(SEL) sel
forEntityGroup:(NSArray *)group
forEntityGroup:(NSArray *)group
{
EOEntity *entity;
EOModel *model;

View file

@ -208,7 +208,7 @@ _mergeValueForKey(id obj, id value,
n = [del count];
if (n>0)
{
IMP oaiIMP=[del methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[del methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < n; i++)
{
@ -222,7 +222,7 @@ _mergeValueForKey(id obj, id value,
n = [add count];
if (n>0)
{
IMP oaiIMP=[add methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[add methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < n; i++)
{
@ -412,7 +412,7 @@ _mergeValueForKey(id obj, id value,
n = [changes count];
if (n>0)
{
IMP oaiIMP=[del methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[del methodForSelector: @selector(objectAtIndex:)];
for(i = 0; i < n; i++)
{
@ -466,7 +466,7 @@ _mergeValueForKey(id obj, id value,
if (cnt>0)
{
IMP oaiIMP=[gids methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[gids methodForSelector: @selector(objectAtIndex:)];
for (j=0; j<cnt; j++)
{
@ -552,7 +552,7 @@ _mergeValueForKey(id obj, id value,
n=[deletedGIDs count];
if (n>0)
{
IMP oaiIMP=[deletedGIDs methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[deletedGIDs methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < n; i++)
{
id obj = GDL2ObjectAtIndexWithImp(deletedGIDs,oaiIMP,i);
@ -587,7 +587,7 @@ _mergeValueForKey(id obj, id value,
n = [updatedChanges count];
if (n>0)
{
IMP oaiIMP=[deletedGIDs methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[deletedGIDs methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < n; i++)
{
@ -631,7 +631,7 @@ _mergeValueForKey(id obj, id value,
if ((n = [globalIDs count]))
{
IMP oaiIMP=[globalIDs methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[globalIDs methodForSelector: @selector(objectAtIndex:)];
SEL sel = @selector(editingContext:shouldMergeChangesForObject:);
BOOL send;
send = [_delegate respondsToSelector: sel];
@ -695,12 +695,12 @@ _mergeValueForKey(id obj, id value,
NSDictionary *change;
id objVal, ssVal;
unsigned i,n;
IMP chgsAddObjectIMP=[chgs methodForSelector: GDL2_addObjectSEL];
IMP chgsAddObjectIMP=[chgs methodForSelector: @selector(addObject:)];
n = [attribKeys count];
if (n>0)
{
IMP oaiIMP=[attribKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[attribKeys methodForSelector: @selector(objectAtIndex:)];
for(i = 0; i < n; i++)
{
@ -723,7 +723,7 @@ _mergeValueForKey(id obj, id value,
n = [toOneKeys count];
if (n>0)
{
IMP oaiIMP = [toOneKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP = [toOneKeys methodForSelector: @selector(objectAtIndex:)];
IMP globalIDForObjectIMP = NULL;
for(i = 0; i < n; i++)
@ -749,7 +749,7 @@ _mergeValueForKey(id obj, id value,
n = [toManyKeys count];
if (n>0)
{
IMP oaiIMP=[toManyKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[toManyKeys methodForSelector: @selector(objectAtIndex:)];
for(i = 0; i < n; i++)
{
@ -798,8 +798,8 @@ _mergeValueForKey(id obj, id value,
if (n>0)
{
IMP oaiIMP=[array methodForSelector: GDL2_objectAtIndexSEL];
IMP aoIMP=[set methodForSelector: GDL2_addObjectSEL];
IMP oaiIMP=[array methodForSelector: @selector(objectAtIndex:)];
IMP aoIMP=[set methodForSelector: @selector(addObject:)];
for (i=0; i<n; i++)
{
@ -1111,7 +1111,7 @@ _mergeValueForKey(id obj, id value,
{
unsigned i = 0;
SEL iowgidSEL = @selector(_invalidateObjectWithGlobalID:);//TODO optimz
IMP oaiIMP = [gids methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP = [gids methodForSelector: @selector(objectAtIndex:)];
IMP iowgidIMP = [self methodForSelector: iowgidSEL];
for (i=0; i<count; i++)
@ -1140,7 +1140,7 @@ _mergeValueForKey(id obj, id value,
if (count>0)
{
IMP oaiIMP = [gids methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP = [gids methodForSelector: @selector(objectAtIndex:)];
IMP insertedAddObjectIMP = NULL;
IMP deletedAddObjectIMP = NULL;
IMP objectForGlobalIDIMP=NULL;
@ -1155,14 +1155,14 @@ _mergeValueForKey(id obj, id value,
if (NSHashGet(_insertedObjects, obj))
{
if (!insertedAddObjectIMP)
insertedAddObjectIMP = [insertedObjects methodForSelector: GDL2_addObjectSEL];
insertedAddObjectIMP = [insertedObjects methodForSelector: @selector(addObject:)];
GDL2AddObjectWithImp(insertedObjects, insertedAddObjectIMP, obj);
}
if (NSHashGet(_deletedObjects, obj))
{
if (!deletedAddObjectIMP)
deletedAddObjectIMP = [deletedObjects methodForSelector: GDL2_addObjectSEL];
deletedAddObjectIMP = [deletedObjects methodForSelector: @selector(addObject:)];
GDL2AddObjectWithImp(deletedObjects, deletedAddObjectIMP, obj);
}
}
@ -1622,7 +1622,7 @@ _mergeValueForKey(id obj, id value,
forKey: EOInsertedKey];
unprocessedInsertsGlobalIDs
= [self resultsOfPerformingSelector: GDL2_globalIDForObjectSEL
= [self resultsOfPerformingSelector: @selector(globalIDForObject:)
withEachObjectInArray: unprocessedInsertsArray];
[globalIDsUserInfo setObject: unprocessedInsertsGlobalIDs
@ -1675,7 +1675,7 @@ _mergeValueForKey(id obj, id value,
[objectsUserInfo setObject: unprocessedDeletesArray
forKey: EODeletedKey];
unprocessedDeletesGlobalIDs
= [self resultsOfPerformingSelector: GDL2_globalIDForObjectSEL
= [self resultsOfPerformingSelector: @selector(globalIDForObject:)
withEachObjectInArray: unprocessedDeletesArray];
[globalIDsUserInfo setObject: unprocessedDeletesGlobalIDs
@ -1695,7 +1695,7 @@ _mergeValueForKey(id obj, id value,
forKey: EOUpdatedKey];
unprocessedChangesGlobalIDs
= [self resultsOfPerformingSelector: GDL2_globalIDForObjectSEL
= [self resultsOfPerformingSelector: @selector(globalIDForObject:)
withEachObjectInArray: unprocessedChangesArray];
[globalIDsUserInfo setObject: unprocessedChangesGlobalIDs
@ -2089,7 +2089,7 @@ _mergeValueForKey(id obj, id value,
count = [toOneRelationshipKeys count];
if (count > 0)
{
IMP oaiIMP=[toOneRelationshipKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[toOneRelationshipKeys methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < count; i++)
{
@ -2171,7 +2171,7 @@ _mergeValueForKey(id obj, id value,
count = [toManyRelationshipKeys count];
IMP oaiIMP=[toManyRelationshipKeys methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP=[toManyRelationshipKeys methodForSelector: @selector(objectAtIndex:)];
for (i = 0; i < count; i++)
{

View file

@ -321,7 +321,7 @@ initialize(void)
if (count>0)
{
unsigned int i=0;
IMP oaiIMP = [self methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP = [self methodForSelector: @selector(objectAtIndex:)];
for (i=0; i<count; i++)
{
left = result;
@ -358,7 +358,7 @@ initialize(void)
if (count>0)
{
unsigned int i=0;
IMP oaiIMP = [self methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP = [self methodForSelector: @selector(objectAtIndex:)];
for (i=0; i<count; i++)
{
@ -405,7 +405,7 @@ initialize(void)
unsigned int i=0;
id current = nil;
id currentVal = nil;
IMP oaiIMP = [self methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP = [self methodForSelector: @selector(objectAtIndex:)];
for(i=0; i<count && (resultVal == nil || resultVal == GDL2EONull); i++)
{
@ -448,7 +448,7 @@ initialize(void)
id current=nil;
id currentVal=nil;
unsigned int i = 0;
IMP oaiIMP = [self methodForSelector: GDL2_objectAtIndexSEL];
IMP oaiIMP = [self methodForSelector: @selector(objectAtIndex:)];
for(i=0; i<count && (resultVal == nil || resultVal == GDL2EONull); i++)
{

View file

@ -266,7 +266,7 @@ RCS_ID("$Id$")
{
int i=0;
GDL2IMP_UINT indexForKeyIMP=NULL;
IMP objectAtIndexIMP=[keys methodForSelector:GDL2_objectAtIndexSEL];
IMP objectAtIndexIMP=[keys methodForSelector:@selector(objectAtIndex:)];
for (i = 0; i < keyCount; i++)
{
@ -307,8 +307,8 @@ RCS_ID("$Id$")
int i;
GDL2IMP_UINT selfIndexForKeyIMP=NULL;
GDL2IMP_UINT sourceInitializerIndexForKeyIMP=NULL;
IMP sourceObjectAtIndexIMP=[sourceKeys methodForSelector:GDL2_objectAtIndexSEL];
IMP destinationObjectAtIndexIMP=[destinationKeys methodForSelector:GDL2_objectAtIndexSEL];
IMP sourceObjectAtIndexIMP=[sourceKeys methodForSelector:@selector(objectAtIndex:)];
IMP destinationObjectAtIndexIMP=[destinationKeys methodForSelector:@selector(objectAtIndex:)];
for (i = 0; i < keyCount; i++)
{

View file

@ -57,57 +57,6 @@ GDL2CONTROL_EXPORT Class GDL2MKKDClass;
GDL2CONTROL_EXPORT Class GDL2EOMKKDInitializerClass;
GDL2CONTROL_EXPORT Class GDL2EOEditingContextClass;
// ==== Selectors ====
GDL2CONTROL_EXPORT SEL GDL2_newSEL;
GDL2CONTROL_EXPORT SEL GDL2_allocWithZoneSEL;
// ---- String Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_isEqualToStringSEL;
GDL2CONTROL_EXPORT SEL GDL2_appendStringSEL;
GDL2CONTROL_EXPORT SEL GDL2_stringWithCString_lengthSEL;
GDL2CONTROL_EXPORT SEL GDL2_stringWithCStringSEL;
GDL2CONTROL_EXPORT SEL GDL2_defaultCStringEncodingSEL;
// ---- Data Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_dataWithBytes_lengthSEL;
// ---- Array Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_addObjectSEL;
GDL2CONTROL_EXPORT SEL GDL2_objectAtIndexSEL;
GDL2CONTROL_EXPORT SEL GDL2_indexOfObjectIdenticalToSEL;
GDL2CONTROL_EXPORT SEL GDL2_lastObjectSEL;
GDL2CONTROL_EXPORT SEL GDL2_arrayWithCapacitySEL;
GDL2CONTROL_EXPORT SEL GDL2_arrayWithArraySEL;
GDL2CONTROL_EXPORT SEL GDL2_arraySEL;
// ---- Enumerator Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_nextObjectSEL;
// ---- KVC Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_storedValueForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_takeStoredValueForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_valueForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_takeValueForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_validateValueForKeySEL;
// ---- GDL2 Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_recordObjectGlobalIDSEL;
GDL2CONTROL_EXPORT SEL GDL2_objectForGlobalIDSEL;
GDL2CONTROL_EXPORT SEL GDL2_globalIDForObjectSEL;
// ---- Dictionary Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_objectForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_setObjectForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_removeObjectForKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_dictionaryWithCapacitySEL;
// ---- NSObject Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_respondsToSelectorSEL;
// ---- KMKKD Selectors ----
GDL2CONTROL_EXPORT SEL GDL2_hasKeySEL;
GDL2CONTROL_EXPORT SEL GDL2_indexForKeySEL;
// ==== IMPs ====
GDL2CONTROL_EXPORT IMP GDL2NSAutoreleasePool_newIMP;
GDL2CONTROL_EXPORT IMP GDL2NSNumber_allocWithZoneIMP;
@ -163,43 +112,43 @@ _isNilOrEONull(id obj)
// ---- NSMutableString appendString: ----
#define GDL2AppendStringWithImp(string,methodIMP,aString) \
(*(methodIMP))((string),GDL2_appendStringSEL,(aString))
(*(methodIMP))((string),@selector(appendString:),(aString))
static inline void GDL2AppendStringWithImpPtr(NSMutableString* object,IMP* impPtr,NSString* string)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_appendStringSEL];
(**impPtr)(object,GDL2_appendStringSEL,string);
*impPtr=[object methodForSelector:@selector(appendString:)];
(**impPtr)(object,@selector(appendString:),string);
};
};
// ---- NSMutableArray addObject: ----
#define GDL2AddObjectWithImp(array,methodIMP,anObject) \
(*(methodIMP))((array),GDL2_addObjectSEL,(anObject))
(*(methodIMP))((array),@selector(addObject:),(anObject))
static inline void GDL2AddObjectWithImpPtr(id object,IMP* impPtr,id objectToAdd)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_addObjectSEL];
(**impPtr)(object,GDL2_addObjectSEL,objectToAdd);
*impPtr=[object methodForSelector:@selector(addObject:)];
(**impPtr)(object,@selector(addObject:),objectToAdd);
};
};
// ---- NSArray objectAtIndex: ----
#define GDL2ObjectAtIndexWithImp(array,methodIMP,index) \
(*(methodIMP))((array),GDL2_objectAtIndexSEL,(index))
(*(methodIMP))((array),@selector(objectAtIndex:),(index))
static inline id GDL2ObjectAtIndexWithImpPtr(id object,IMP* impPtr,int index)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_objectAtIndexSEL];
return (**impPtr)(object,GDL2_objectAtIndexSEL,index);
*impPtr=[object methodForSelector:@selector(objectAtIndex:)];
return (**impPtr)(object,@selector(objectAtIndex:),index);
}
else
return nil;
@ -207,20 +156,20 @@ static inline id GDL2ObjectAtIndexWithImpPtr(id object,IMP* impPtr,int index)
// ---- NSArray indexOfObjectIdenticalTo: ----
#define GDL2IndexOfObjectIdenticalToWithImp(array,methodIMP,anObject) \
(*(methodIMP))((array),GDL2_indexOfObjectIdenticalToSEL,(anObject))
(*(methodIMP))((array),@selector(indexOfObjectIdenticalTo:),(anObject))
// ---- NSArray lastObject ----
#define GDL2LastObjectWithImp(array,methodIMP) \
(*(methodIMP))((array),GDL2_lastObjectSEL)
(*(methodIMP))((array),@selector(lastObject))
static inline id GDL2LastObjectWithImpPtr(id object,IMP* impPtr)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_lastObjectSEL];
return (**impPtr)(object,GDL2_lastObjectSEL);
*impPtr=[object methodForSelector:@selector(lastObject)];
return (**impPtr)(object,@selector(lastObject));
}
else
return nil;
@ -228,15 +177,15 @@ static inline id GDL2LastObjectWithImpPtr(id object,IMP* impPtr)
// ---- NSEnumerator nextObject ----
#define GDL2NextObjectWithImp(enumerator,methodIMP) \
(*(methodIMP))((enumerator),GDL2_nextObjectSEL)
(*(methodIMP))((enumerator),@selector(nextObject))
static inline id GDL2NextObjectWithImpPtr(id object,IMP* impPtr)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_nextObjectSEL];
return (**impPtr)(object,GDL2_nextObjectSEL);
*impPtr=[object methodForSelector:@selector(nextObject)];
return (**impPtr)(object,@selector(nextObject));
}
else
return nil;
@ -244,15 +193,15 @@ static inline id GDL2NextObjectWithImpPtr(id object,IMP* impPtr)
// ---- KVC storedValueForKey: ----
#define GDL2StoredValueForKeyWithImp(object,methodIMP,value,key) \
(*methodIMP)((object),GDL2_storedValueForKeySEL,value,key)
(*methodIMP)((object),@selector(storedValueForKey:),value,key)
static inline id GDL2StoredValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_storedValueForKeySEL];
return (**impPtr)(object,GDL2_storedValueForKeySEL,key);
*impPtr=[object methodForSelector:@selector(storedValueForKey:)];
return (**impPtr)(object,@selector(storedValueForKey:),key);
}
else
return nil;
@ -260,29 +209,29 @@ static inline id GDL2StoredValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
// ---- KVC takeStoredValue:forKey: ----
#define GDL2TakeStoredValueForKeyWithImp(object,methodIMP,value,key) \
(*methodIMP)((object),GDL2_takeStoredValueForKeySEL,value,key)
(*methodIMP)((object),@selector(takeStoredValue:forKey:),value,key)
static inline void GDL2TakeStoredValueForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_takeStoredValueForKeySEL];
(**impPtr)(object,GDL2_takeStoredValueForKeySEL,value,key);
*impPtr=[object methodForSelector:@selector(takeStoredValue:forKey:)];
(**impPtr)(object,@selector(takeStoredValue:forKey:),value,key);
};
};
// ---- KVC valueForKey: ----
#define GDL2ValueForKeyWithImp(object,methodIMP,value,key) \
(*methodIMP)((object),GDL2_valueForKeySEL,value,key)
(*methodIMP)((object),@selector(valueForKey:),value,key)
static inline id GDL2ValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_valueForKeySEL];
return (**impPtr)(object,GDL2_valueForKeySEL,key);
*impPtr=[object methodForSelector:@selector(valueForKey:)];
return (**impPtr)(object,@selector(valueForKey:),key);
}
else
return nil;
@ -290,29 +239,29 @@ static inline id GDL2ValueForKeyWithImpPtr(id object,IMP* impPtr,id key)
// ---- KVC takeValue:forKey: ----
#define GDL2TakeValueForKeyWithImp(object,methodIMP,value,key) \
(*methodIMP)((object),GDL2_takeValueForKeySEL,value,key)
(*methodIMP)((object),@selector(takeValue:forKey:),value,key)
static inline void GDL2TakeValueForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_takeValueForKeySEL];
(**impPtr)(object,GDL2_takeValueForKeySEL,value,key);
*impPtr=[object methodForSelector:@selector(takeValue:forKey:)];
(**impPtr)(object,@selector(takeValue:forKey:),value,key);
};
};
// ---- KVC validateValue:forKey: ----
#define GDL2ValidateValueForKeyWithImp(object,methodIMP,valuePtr,key) \
(*methodIMP)((object),GDL2_validateValueForKeySEL,valuePtr,key)
(*methodIMP)((object),@selector(validateValue:forKey:),valuePtr,key)
static inline id GDL2ValidateValueForKeyWithImpPtr(id object,IMP* impPtr,id* valuePtr,id key)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_validateValueForKeySEL];
return (**impPtr)(object,GDL2_validateValueForKeySEL,valuePtr,key);
*impPtr=[object methodForSelector:@selector(validateValue:forKey:)];
return (**impPtr)(object,@selector(validateValue:forKey:),valuePtr,key);
}
else
return nil;
@ -320,15 +269,15 @@ static inline id GDL2ValidateValueForKeyWithImpPtr(id object,IMP* impPtr,id* val
// ---- Dictionary objectForKey: ----
#define GDL2ObjectForKeyWithImp(object,methodIMP,value,key) \
(*methodIMP)((object),GDL2_objectForKeySEL,value,key)
(*methodIMP)((object),@selector(objectForKey:),value,key)
static inline id GDL2ObjectForKeyWithImpPtr(id object,IMP* impPtr,id key)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_objectForKeySEL];
return (**impPtr)(object,GDL2_objectForKeySEL,key);
*impPtr=[object methodForSelector:@selector(objectForKey:)];
return (**impPtr)(object,@selector(objectForKey:),key);
}
else
return nil;
@ -336,77 +285,77 @@ static inline id GDL2ObjectForKeyWithImpPtr(id object,IMP* impPtr,id key)
// ---- Dictionary setObject:forKey: ----
#define GDL2SetObjectForKeyWithImp(object,methodIMP,value,key) \
(*methodIMP)((object),GDL2_setObjectForKeySEL,value,key)
(*methodIMP)((object),@selector(setObject:forKey:),value,key)
static inline void GDL2SetObjectForKeyWithImpPtr(id object,IMP* impPtr,id value, id key)
{
if (object)
{
if (!*impPtr)
*impPtr=[object methodForSelector:GDL2_setObjectForKeySEL];
(**impPtr)(object,GDL2_setObjectForKeySEL,value,key);
*impPtr=[object methodForSelector:@selector(setObject:forKey:)];
(**impPtr)(object,@selector(setObject:forKey:),value,key);
}
};
// ---- NSString stringWithCString:length: ----
#define GDL2StringWithCStringAndLength(cString,length) \
(*GDL2NSString_stringWithCString_lengthIMP)(GDL2NSStringClass,GDL2_stringWithCString_lengthSEL,(const char*)(cString),(int)(length))
#define GDL2StringWithCStringAndLength(cString,len) \
(*GDL2NSString_stringWithCString_lengthIMP)(GDL2NSStringClass,@selector(stringWithCString:length:),(const char*)(cString),(unsigned)(len))
// ---- NSString stringWithCString: ----
#define GDL2StringWithCString(cString) \
(*GDL2NSString_stringWithCStringIMP)(GDL2NSStringClass,GDL2_stringWithCStringSEL,(const char*)(cString))
(*GDL2NSString_stringWithCStringIMP)(GDL2NSStringClass,@selector(stringWithCString:),(const char*)(cString))
// ---- NSString +defaultCStringEncoding ----
#define GDL2StringDefaultCStringEncoding() \
(*GDL2NSString_defaultCStringEncodingIMP)(GDL2NSStringClass,GDL2_defaultCStringEncodingSEL)
(*GDL2NSString_defaultCStringEncodingIMP)(GDL2NSStringClass,@selector(defaultCStringEncoding))
// ---- NSAutoreleasePool +new ----
#define GDL2NSAutoreleasePool_new() \
(*GDL2NSAutoreleasePool_newIMP)(GDL2NSAutoreleasePoolClass,GDL2_newSEL)
(*GDL2NSAutoreleasePool_newIMP)(GDL2NSAutoreleasePoolClass,@selector(new))
// ---- NSString +alloc ----
#define GDL2NSString_alloc() \
(*GDL2NSString_allocWithZoneIMP)(GDL2NSStringClass,GDL2_allocWithZoneSEL,NULL)
(*GDL2NSString_allocWithZoneIMP)(GDL2NSStringClass,@selector(allocWithZone:),NULL)
// ---- NSDecimalNumber +alloc ----
#define GDL2NSDecimalNumber_alloc() \
(*GDL2NSDecimalNumber_allocWithZoneIMP)(GDL2NSDecimalNumberClass,GDL2_allocWithZoneSEL,NULL)
(*GDL2NSDecimalNumber_allocWithZoneIMP)(GDL2NSDecimalNumberClass,@selector(allocWithZone:),NULL)
// ---- NSNumber +alloc ----
#define GDL2NSNumber_alloc() \
(*GDL2NSNumber_allocWithZoneIMP)(GDL2NSNumberClass,GDL2_allocWithZoneSEL,NULL)
(*GDL2NSNumber_allocWithZoneIMP)(GDL2NSNumberClass,@selector(allocWithZone:),NULL)
// ---- NSCalendarDate +alloc ----
#define GDL2NSCalendarDate_alloc() \
(*GDL2NSCalendarDate_allocWithZoneIMP)(GDL2NSCalendarDateClass,GDL2_allocWithZoneSEL,NULL)
(*GDL2NSCalendarDate_allocWithZoneIMP)(GDL2NSCalendarDateClass,@selector(allocWithZone:),NULL)
// ---- NSData +alloc ----
#define GDL2NSData_alloc() \
(*GDL2NSData_allocWithZoneIMP)(GDL2NSDataClass,GDL2_allocWithZoneSEL,NULL)
(*GDL2NSData_allocWithZoneIMP)(GDL2NSDataClass,@selector(allocWithZone:),NULL)
// ---- NSData dataWithBytes:length: ----
#define GDL2DataWithBytesAndLength(bytes,length) \
(*GDL2NSData_dataWithBytes_lengthIMP)(GDL2NSDataClass,GDL2_dataWithBytes_lengthSEL,(const void*)(bytes),(int)(length))
(*GDL2NSData_dataWithBytes_lengthIMP)(GDL2NSDataClass,@selector(dataWithBytes:length:),(const void*)(bytes),(int)(length))
// ---- NSMutableArray +arrayWithCapacity: ----
#define GDL2MutableArrayWithCapacity(capacity) \
(*GDL2NSMutableArray_arrayWithCapacityIMP)(GDL2NSMutableArrayClass,GDL2_arrayWithCapacitySEL,capacity)
(*GDL2NSMutableArray_arrayWithCapacityIMP)(GDL2NSMutableArrayClass,@selector(arrayWithCapacity:),capacity)
// ---- NSMutableArray +arrayWithArray: ----
#define GDL2MutableArrayWithArray(array) \
(*GDL2NSMutableArray_arrayWithArrayIMP)(GDL2NSMutableArrayClass,GDL2_arrayWithArraySEL,array)
(*GDL2NSMutableArray_arrayWithArrayIMP)(GDL2NSMutableArrayClass,@selector(arrayWithArray:),array)
// ---- NSMutableArray +array ----
#define GDL2MutableArray() \
(*GDL2NSMutableArray_arrayIMP)(GDL2NSMutableArrayClass,GDL2_arraySEL)
(*GDL2NSMutableArray_arrayIMP)(GDL2NSMutableArrayClass,(array))
// ---- NSArray +array ----
#define GDL2Array() \
(*GDL2NSArray_arrayIMP)(GDL2NSArrayClass,GDL2_arraySEL)
(*GDL2NSArray_arrayIMP)(GDL2NSArrayClass,@selector(array))
// ---- NSMutableDictionary +dictionaryWithCapacity: ----
#define GDL2MutableDictionaryWithCapacity(capacity) \
(*GDL2NSMutableDictionary_dictionaryWithCapacityIMP)(GDL2NSMutableDictionaryClass,GDL2_dictionaryWithCapacitySEL,capacity)
(*GDL2NSMutableDictionary_dictionaryWithCapacityIMP)(GDL2NSMutableDictionaryClass,@selector(dictionaryWithCapacity:),capacity)
// ---- NSObject respondsToSelector: ----
static inline BOOL GDL2RespondsToSelectorWithImpPtr(id object,GDL2IMP_BOOL* impPtr,SEL sel)
@ -414,8 +363,8 @@ static inline BOOL GDL2RespondsToSelectorWithImpPtr(id object,GDL2IMP_BOOL* impP
if (object)
{
if (!*impPtr)
*impPtr=(GDL2IMP_BOOL)[object methodForSelector:GDL2_respondsToSelectorSEL];
return (**impPtr)(object,GDL2_respondsToSelectorSEL,sel);
*impPtr=(GDL2IMP_BOOL)[object methodForSelector:@selector(respondsToSelector:)];
return (**impPtr)(object,@selector(respondsToSelector:),sel);
}
else
return NO;

View file

@ -64,57 +64,6 @@ Class GDL2MKKDClass=Nil;
Class GDL2EOMKKDInitializerClass=Nil;
Class GDL2EOEditingContextClass=Nil;
// ==== Selectors ====
SEL GDL2_newSEL=NULL;
SEL GDL2_allocWithZoneSEL=NULL;
// ---- String Selectors ----
SEL GDL2_isEqualToStringSEL=NULL;
SEL GDL2_appendStringSEL=NULL;
SEL GDL2_stringWithCString_lengthSEL=NULL;
SEL GDL2_stringWithCStringSEL=NULL;
SEL GDL2_defaultCStringEncodingSEL=NULL;
// ---- Data Selectors ----
SEL GDL2_dataWithBytes_lengthSEL=NULL;
// ---- Array Selectors ----
SEL GDL2_addObjectSEL=NULL;
SEL GDL2_objectAtIndexSEL=NULL;
SEL GDL2_indexOfObjectIdenticalToSEL=NULL;
SEL GDL2_lastObjectSEL=NULL;
SEL GDL2_arrayWithCapacitySEL=NULL;
SEL GDL2_arrayWithArraySEL=NULL;
SEL GDL2_arraySEL=NULL;
// ---- Enumerator Selectors ----
SEL GDL2_nextObjectSEL=NULL;
// ---- KVC Selectors ----
SEL GDL2_storedValueForKeySEL=NULL;
SEL GDL2_takeStoredValueForKeySEL=NULL;
SEL GDL2_valueForKeySEL=NULL;
SEL GDL2_takeValueForKeySEL=NULL;
SEL GDL2_validateValueForKeySEL=NULL;
// ---- GDL2 Selectors ----
SEL GDL2_recordObjectGlobalIDSEL=NULL;
SEL GDL2_objectForGlobalIDSEL=NULL;
SEL GDL2_globalIDForObjectSEL=NULL;
// ---- Dictionary Selectors ----
SEL GDL2_objectForKeySEL=NULL;
SEL GDL2_setObjectForKeySEL=NULL;
SEL GDL2_removeObjectForKeySEL=NULL;
SEL GDL2_dictionaryWithCapacitySEL=NULL;
// ---- NSObject Selectors ----
SEL GDL2_respondsToSelectorSEL=NULL;
// ---- KMKKD Selectors ----
SEL GDL2_hasKeySEL=NULL;
SEL GDL2_indexForKeySEL=NULL;
// ==== IMPs ====
IMP GDL2NSAutoreleasePool_newIMP=NULL;
IMP GDL2NSNumber_allocWithZoneIMP=NULL;
@ -175,113 +124,62 @@ void GDL2PrivInit()
GDL2EOMKKDInitializerClass = [EOMKKDInitializer class];
GDL2EOEditingContextClass = [EOEditingContext class];
// ==== Selectors ====
GDL2_newSEL=@selector(new);
GDL2_allocWithZoneSEL=@selector(alloc);
// ---- String Selectors ----
GDL2_isEqualToStringSEL=@selector(isEqualToString:);
GDL2_appendStringSEL=@selector(appendString:);
GDL2_stringWithCString_lengthSEL=@selector(stringWithCString:length:);
GDL2_stringWithCStringSEL=@selector(stringWithCString:);
GDL2_defaultCStringEncodingSEL=@selector(defaultCStringEncoding);
// ---- Data Selectors ----
GDL2_dataWithBytes_lengthSEL=@selector(dataWithBytes:length:);
// ---- Array Selectors ----
GDL2_addObjectSEL=@selector(addObject:);
GDL2_objectAtIndexSEL=@selector(objectAtIndex:);
GDL2_indexOfObjectIdenticalToSEL=@selector(indexOfObjectIdenticalTo:);
GDL2_lastObjectSEL=@selector(lastObject);
GDL2_arrayWithCapacitySEL=@selector(arrayWithCapacity:);
GDL2_arrayWithArraySEL=@selector(arrayWithArray:);
GDL2_arraySEL=@selector(array);
// ---- Enumerator Selectors ----
GDL2_nextObjectSEL=@selector(nextObject);
// ---- KVC Selectors ----
GDL2_storedValueForKeySEL=@selector(storedValueForKey:);
GDL2_takeStoredValueForKeySEL=@selector(takeStoredValue:forKey:);
GDL2_valueForKeySEL=@selector(valueForKey:);
GDL2_takeValueForKeySEL=@selector(takeValue:forKey:);
GDL2_validateValueForKeySEL=@selector(validateValue:forKey:);
// ---- GDL2 Selectors ----
GDL2_recordObjectGlobalIDSEL=@selector(recordObject:globalID:);
GDL2_objectForGlobalIDSEL=@selector(objectForGlobalID:);
GDL2_globalIDForObjectSEL=@selector(globalIDForObject:);
// ---- Dictionary Selectors ----
GDL2_objectForKeySEL=@selector(objectForKey:);
GDL2_setObjectForKeySEL=@selector(setObject:forKey:);
GDL2_removeObjectForKeySEL=@selector(removeObjectForKey:);
GDL2_dictionaryWithCapacitySEL=@selector(dictionaryWithCapacity:);
// ---- NSObject Selectors ----
GDL2_respondsToSelectorSEL=@selector(respondsToSelector:);
// ---- KMKKD Selectors ----
GDL2_hasKeySEL=@selector(hasKey:);
GDL2_indexForKeySEL=@selector(indexForKey:);
// ==== IMPs ====
GDL2NSAutoreleasePool_newIMP=
[GDL2NSAutoreleasePoolClass methodForSelector:GDL2_newSEL];
[GDL2NSAutoreleasePoolClass methodForSelector:@selector(new)];
GDL2NSNumber_allocWithZoneIMP=
[GDL2NSNumberClass methodForSelector:GDL2_allocWithZoneSEL];
[GDL2NSNumberClass methodForSelector:@selector(allocWithZone:)];
GDL2NSDecimalNumber_allocWithZoneIMP=
[GDL2NSDecimalNumberClass methodForSelector:GDL2_allocWithZoneSEL];
[GDL2NSDecimalNumberClass methodForSelector:@selector(allocWithZone:)];
GDL2NSString_allocWithZoneIMP=
[GDL2NSStringClass methodForSelector:GDL2_allocWithZoneSEL];
[GDL2NSStringClass methodForSelector:@selector(allocWithZone:)];
GDL2NSCalendarDate_allocWithZoneIMP=
[GDL2NSCalendarDateClass methodForSelector:GDL2_allocWithZoneSEL];
[GDL2NSCalendarDateClass methodForSelector:@selector(allocWithZone:)];
GDL2NSData_allocWithZoneIMP=
[GDL2NSDataClass methodForSelector:GDL2_allocWithZoneSEL];
[GDL2NSDataClass methodForSelector:@selector(allocWithZone:)];
GDL2NSData_dataWithBytes_lengthIMP=
[GDL2NSDataClass methodForSelector:GDL2_dataWithBytes_lengthSEL];
[GDL2NSDataClass methodForSelector:@selector(dataWithBytes:length:)];
GDL2NSString_stringWithCString_lengthIMP=
[GDL2NSStringClass methodForSelector:GDL2_stringWithCString_lengthSEL];
[GDL2NSStringClass methodForSelector:@selector(stringWithCString:length:)];
GDL2NSString_stringWithCStringIMP=
[GDL2NSStringClass methodForSelector:GDL2_stringWithCStringSEL];
[GDL2NSStringClass methodForSelector:@selector(stringWithCString:)];
GDL2NSString_defaultCStringEncodingIMP=
(GDL2IMP_NSStringEncoding)[GDL2NSStringClass methodForSelector:GDL2_defaultCStringEncodingSEL];
(GDL2IMP_NSStringEncoding)[GDL2NSStringClass methodForSelector:@selector(defaultCStringEncoding)];
GDL2MKKD_objectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:GDL2_objectForKeySEL];
GDL2MKKD_setObjectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:GDL2_setObjectForKeySEL];
GDL2MKKD_removeObjectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:GDL2_removeObjectForKeySEL];
GDL2MKKD_hasKeyIMP=(GDL2IMP_BOOL)[GDL2MKKDClass instanceMethodForSelector:GDL2_hasKeySEL];
GDL2MKKD_indexForKeyIMP=(GDL2IMP_UINT)[GDL2MKKDClass instanceMethodForSelector:GDL2_indexForKeySEL];
GDL2EOMKKDInitializer_indexForKeyIMP=(GDL2IMP_UINT)[GDL2EOMKKDInitializerClass instanceMethodForSelector:GDL2_indexForKeySEL];
GDL2MKKD_objectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:@selector(objectForKey:)];
GDL2MKKD_setObjectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:@selector(setObject:forKey:)];
GDL2MKKD_removeObjectForKeyIMP=[GDL2MKKDClass instanceMethodForSelector:@selector(removeObjectForKey:)];
GDL2MKKD_hasKeyIMP=(GDL2IMP_BOOL)[GDL2MKKDClass instanceMethodForSelector:@selector(hasKey:)];
GDL2MKKD_indexForKeyIMP=(GDL2IMP_UINT)[GDL2MKKDClass instanceMethodForSelector:@selector(indexForKey:)];
GDL2EOMKKDInitializer_indexForKeyIMP=(GDL2IMP_UINT)[GDL2EOMKKDInitializerClass instanceMethodForSelector:@selector(indexForKey:)];
GDL2EOEditingContext_recordObjectGlobalIDIMP==[GDL2EOEditingContextClass instanceMethodForSelector:GDL2_recordObjectGlobalIDSEL];
GDL2EOEditingContext_objectForGlobalIDIMP=[GDL2EOEditingContextClass instanceMethodForSelector:GDL2_objectForGlobalIDSEL];
GDL2EOEditingContext_globalIDForObjectIMP=[GDL2EOEditingContextClass instanceMethodForSelector:GDL2_globalIDForObjectSEL];
GDL2EOEditingContext_recordObjectGlobalIDIMP==[GDL2EOEditingContextClass instanceMethodForSelector:@selector(recordObject:globalID:)];
GDL2EOEditingContext_objectForGlobalIDIMP=[GDL2EOEditingContextClass instanceMethodForSelector:@selector(objectForGlobalID:)];
GDL2EOEditingContext_globalIDForObjectIMP=[GDL2EOEditingContextClass instanceMethodForSelector:@selector(globalIDForObject:)];
GDL2NSMutableArray_arrayWithCapacityIMP=[GDL2NSMutableArrayClass
methodForSelector:GDL2_arrayWithCapacitySEL];
methodForSelector:@selector(arrayWithCapacity:)];
GDL2NSMutableArray_arrayWithArrayIMP=[GDL2NSMutableArrayClass
methodForSelector:GDL2_arrayWithArraySEL];
methodForSelector:@selector(arrayWithArray:)];
GDL2NSMutableArray_arrayIMP=[GDL2NSMutableArrayClass
methodForSelector:GDL2_arraySEL];
methodForSelector:@selector(array)];
GDL2NSArray_arrayIMP=[GDL2NSArrayClass
methodForSelector:GDL2_arraySEL];
methodForSelector:@selector(array)];
GDL2NSMutableDictionary_dictionaryWithCapacityIMP=[GDL2NSMutableDictionaryClass
methodForSelector:GDL2_dictionaryWithCapacitySEL];
methodForSelector:@selector(dictionaryWithCapacity:)];
// ==== Constants ====
ASSIGN(GDL2NSNumberBool_Yes,[GDL2NSNumberClass numberWithBool:YES]);
@ -310,11 +208,11 @@ EOMKKD_objectForKeyWithImpPtr(NSDictionary* mkkd,
&& GDL2MKKD_objectForKeyIMP)
imp=GDL2MKKD_objectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_objectForKeySEL];
imp=[mkkd methodForSelector:@selector(objectForKey:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_objectForKeySEL,key);
return (*imp)(mkkd,@selector(objectForKey:),key);
}
else
return nil;
@ -337,11 +235,11 @@ EOMKKD_setObjectForKeyWithImpPtr(NSDictionary* mkkd,
&& GDL2MKKD_setObjectForKeyIMP)
imp=GDL2MKKD_setObjectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_setObjectForKeySEL];
imp=[mkkd methodForSelector:@selector(setObject:forKey:)];
if (impPtr)
*impPtr=imp;
}
(*imp)(mkkd,GDL2_setObjectForKeySEL,anObject,key);
(*imp)(mkkd,@selector(setObject:forKey:),anObject,key);
};
};
@ -361,11 +259,11 @@ EOMKKD_removeObjectForKeyWithImpPtr(NSDictionary* mkkd,
&& GDL2MKKD_removeObjectForKeyIMP)
imp=GDL2MKKD_removeObjectForKeyIMP;
else
imp=[mkkd methodForSelector:GDL2_removeObjectForKeySEL];
imp=[mkkd methodForSelector:@selector(removeObjectForKey:)];
if (impPtr)
*impPtr=imp;
}
(*imp)(mkkd,GDL2_removeObjectForKeySEL,key);
(*imp)(mkkd,@selector(removeObjectForKey:),key);
};
};
@ -385,11 +283,11 @@ EOMKKD_hasKeyWithImpPtr(NSDictionary* mkkd,
&& GDL2MKKD_hasKeyIMP)
imp=GDL2MKKD_hasKeyIMP;
else
imp=(GDL2IMP_BOOL)[mkkd methodForSelector:GDL2_hasKeySEL];
imp=(GDL2IMP_BOOL)[mkkd methodForSelector:@selector(hasKey:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_hasKeySEL,key);
return (*imp)(mkkd,@selector(hasKey:),key);
}
else
return NO;
@ -411,11 +309,11 @@ EOMKKD_indexForKeyWithImpPtr(EOMutableKnownKeyDictionary* mkkd,
&& GDL2MKKD_indexForKeyIMP)
imp=GDL2MKKD_indexForKeyIMP;
else
imp=(GDL2IMP_UINT)[mkkd methodForSelector:GDL2_indexForKeySEL];
imp=(GDL2IMP_UINT)[mkkd methodForSelector:@selector(indexForKey:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkd,GDL2_indexForKeySEL,key);
return (*imp)(mkkd,@selector(indexForKey:),key);
}
else
return 0;
@ -437,11 +335,11 @@ EOMKKDInitializer_indexForKeyWithImpPtr(EOMKKDInitializer* mkkdInit,
&& GDL2EOMKKDInitializer_indexForKeyIMP)
imp=GDL2EOMKKDInitializer_indexForKeyIMP;
else
imp=(GDL2IMP_UINT)[mkkdInit methodForSelector:GDL2_indexForKeySEL];
imp=(GDL2IMP_UINT)[mkkdInit methodForSelector:@selector(indexForKey:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(mkkdInit,GDL2_indexForKeySEL,key);
return (*imp)(mkkdInit,@selector(indexForKey:),key);
}
else
return 0;
@ -465,11 +363,11 @@ EOEditingContext_objectForGlobalIDWithImpPtr(EOEditingContext *edContext,
&& GDL2EOEditingContext_objectForGlobalIDIMP)
imp=GDL2EOEditingContext_objectForGlobalIDIMP;
else
imp=[edContext methodForSelector:GDL2_objectForGlobalIDSEL];
imp=[edContext methodForSelector:@selector(objectForGlobalID:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_objectForGlobalIDSEL,gid);
return (*imp)(edContext,@selector(objectForGlobalID:),gid);
}
else
return nil;
@ -491,11 +389,11 @@ EOEditingContext_globalIDForObjectWithImpPtr(EOEditingContext *edContext,
&& GDL2EOEditingContext_globalIDForObjectIMP)
imp=GDL2EOEditingContext_globalIDForObjectIMP;
else
imp=[edContext methodForSelector:GDL2_globalIDForObjectSEL];
imp=[edContext methodForSelector:@selector(globalIDForObject:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_globalIDForObjectSEL,object);
return (*imp)(edContext,@selector(globalIDForObject:),object);
}
else
return nil;
@ -518,11 +416,11 @@ EOEditingContext_recordObjectGlobalIDWithImpPtr(EOEditingContext *edContext,
&& GDL2EOEditingContext_recordObjectGlobalIDIMP)
imp=GDL2EOEditingContext_recordObjectGlobalIDIMP;
else
imp=[edContext methodForSelector:GDL2_recordObjectGlobalIDSEL];
imp=[edContext methodForSelector:@selector(recordObject:globalID:)];
if (impPtr)
*impPtr=imp;
}
return (*imp)(edContext,GDL2_recordObjectGlobalIDSEL,object,gid);
return (*imp)(edContext,@selector(recordObject:globalID:),object,gid);
}
else
return nil;