diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-03-17 17:06:33 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-03-17 17:06:33 -0400 |
commit | 5e933847cc9e7826f1a9ee8b3dc1df4960b1ea5d (patch) | |
tree | d21b31c76dee2e7d9a06a65a21eaad5e0c6615f8 /objectivec/GPBMessage.m | |
parent | ca3dc15d4ca3bb1b092928b456ea844637693b61 (diff) | |
parent | 79a23c435c4862d0c7af3c2740662104c77171dc (diff) | |
download | protobuf-5e933847cc9e7826f1a9ee8b3dc1df4960b1ea5d.tar.gz protobuf-5e933847cc9e7826f1a9ee8b3dc1df4960b1ea5d.tar.bz2 protobuf-5e933847cc9e7826f1a9ee8b3dc1df4960b1ea5d.zip |
Merge pull request #1325 from thomasvl/shrink_overhead
Shrink ObjC overhead (generated size and some runtime sizes)
Diffstat (limited to 'objectivec/GPBMessage.m')
-rw-r--r-- | objectivec/GPBMessage.m | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m index d5e8d37b..94d179be 100644 --- a/objectivec/GPBMessage.m +++ b/objectivec/GPBMessage.m @@ -54,18 +54,6 @@ NSString *const GPBExceptionMessageKey = static NSString *const kGPBDataCoderKey = @"GPBData"; -#ifndef _GPBCompileAssert - #if __has_feature(c_static_assert) || __has_extension(c_static_assert) - #define _GPBCompileAssert(test, msg) _Static_assert((test), #msg) - #else - // Pre-Xcode 7 support. - #define _GPBCompileAssertSymbolInner(line, msg) _GPBCompileAssert ## line ## __ ## msg - #define _GPBCompileAssertSymbol(line, msg) _GPBCompileAssertSymbolInner(line, msg) - #define _GPBCompileAssert(test, msg) \ - typedef char _GPBCompileAssertSymbol(__LINE__, msg) [ ((test) ? 1 : -1) ] - #endif // __has_feature(c_static_assert) || __has_extension(c_static_assert) -#endif // _GPBCompileAssert - // // PLEASE REMEMBER: // @@ -789,14 +777,8 @@ static GPBUnknownFieldSet *GetOrMakeUnknownFields(GPBMessage *self) { file:fileDescriptor fields:NULL fieldCount:0 - oneofs:NULL - oneofCount:0 - enums:NULL - enumCount:0 - ranges:NULL - rangeCount:0 storageSize:0 - wireFormat:NO]; + flags:0]; } return descriptor; } @@ -3096,7 +3078,7 @@ static void ResolveIvarSet(GPBFieldDescriptor *field, } else { GPBOneofDescriptor *oneof = field->containingOneof_; if (oneof && (sel == oneof->caseSel_)) { - int32_t index = oneof->oneofDescription_->index; + int32_t index = GPBFieldHasIndex(field); result.impToAdd = imp_implementationWithBlock(^(id obj) { return GPBGetHasOneof(obj, index); }); |