Fix use of reserved 'class' keyword that breaks import into Objective-C++. fixes #355

Added basic spec file that imports the public headers into an Objective-C++ source file.
This commit is contained in:
Blake Watters
2011-09-20 13:04:29 -04:00
parent e535f3abf0
commit 0c96aedc85
6 changed files with 63 additions and 24 deletions

View File

@@ -277,11 +277,11 @@ static NSString* const RKManagedObjectStoreThreadDictionaryEntityCacheKey = @"RK
for (NSManagedObject* object in insertedObjects) {
if ([object respondsToSelector:@selector(primaryKeyProperty)]) {
Class class = [object class];
NSString* primaryKey = [class performSelector:@selector(primaryKeyProperty)];
Class theClass = [object class];
NSString* primaryKey = [theClass performSelector:@selector(primaryKeyProperty)];
id primaryKeyValue = [object valueForKey:primaryKey];
NSMutableDictionary* classCache = [threadDictionary objectForKey:class];
NSMutableDictionary* classCache = [threadDictionary objectForKey:theClass];
if (classCache && primaryKeyValue && [classCache objectForKey:primaryKeyValue] == nil) {
[classCache setObject:object forKey:primaryKeyValue];
}