From d846b0b059b4d867536b98aa29475a387aa09114 Mon Sep 17 00:00:00 2001 From: Thomas Van Lenten Date: Mon, 8 Jun 2015 16:24:57 -0400 Subject: Beta quality drop of Objective C Support. - Add more to the ObjC dir readme. - Merge the ExtensionField and ExtensionDescriptor to reduce overhead. - Fix an initialization race. - Clean up the Xcode schemes. - Remove the class/enum filter. - Remove some forced inline that were bloating things without proof of performance wins. - Rename some internal types to avoid conflicts with the well know types protos. - Drop the use of ApplyFunctions to the compiler/optimizer can do what it wants. - Better document some possible future improvements. - Add missing support for parsing repeated primitive fields in packed or unpacked forms. - Improve -hash. - Add *Count for repeated and map<> fields to avoid auto create when checking for them being set. --- objectivec/GPBRootObject.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'objectivec/GPBRootObject.m') diff --git a/objectivec/GPBRootObject.m b/objectivec/GPBRootObject.m index 38dab665..3f648257 100644 --- a/objectivec/GPBRootObject.m +++ b/objectivec/GPBRootObject.m @@ -36,7 +36,6 @@ #import #import "GPBDescriptor.h" -#import "GPBExtensionField.h" #import "GPBUtilities_PackagePrivate.h" @interface GPBExtensionDescriptor (GPBRootObject) @@ -130,14 +129,14 @@ static CFMutableDictionaryRef gExtensionSingletonDictionary = NULL; return nil; } -+ (void)globallyRegisterExtension:(GPBExtensionField *)field { - const char *key = [field.descriptor singletonNameC]; ++ (void)globallyRegisterExtension:(GPBExtensionDescriptor *)field { + const char *key = [field singletonNameC]; OSSpinLockLock(&gExtensionSingletonDictionaryLock_); CFDictionarySetValue(gExtensionSingletonDictionary, key, field); OSSpinLockUnlock(&gExtensionSingletonDictionaryLock_); } -GPB_INLINE id ExtensionForName(id self, SEL _cmd) { +static id ExtensionForName(id self, SEL _cmd) { // Really fast way of doing "classname_selName". // This came up as a hotspot (creation of NSString *) when accessing a // lot of extensions. -- cgit v1.2.3