aboutsummaryrefslogtreecommitdiff
path: root/objectivec/google/protobuf/FieldMask.pbobjc.m
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2015-06-08 16:24:57 -0400
committerThomas Van Lenten <thomasvl@google.com>2015-06-08 17:17:22 -0400
commitd846b0b059b4d867536b98aa29475a387aa09114 (patch)
tree25ebf99cd0462281add17fc94bdf185e5fd9096c /objectivec/google/protobuf/FieldMask.pbobjc.m
parent3f9be70d067fb03cd03f99522473dee265b84ddb (diff)
downloadprotobuf-d846b0b059b4d867536b98aa29475a387aa09114.tar.gz
protobuf-d846b0b059b4d867536b98aa29475a387aa09114.tar.bz2
protobuf-d846b0b059b4d867536b98aa29475a387aa09114.zip
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.
Diffstat (limited to 'objectivec/google/protobuf/FieldMask.pbobjc.m')
-rw-r--r--objectivec/google/protobuf/FieldMask.pbobjc.m46
1 files changed, 26 insertions, 20 deletions
diff --git a/objectivec/google/protobuf/FieldMask.pbobjc.m b/objectivec/google/protobuf/FieldMask.pbobjc.m
index e37ac6c2..f9684f51 100644
--- a/objectivec/google/protobuf/FieldMask.pbobjc.m
+++ b/objectivec/google/protobuf/FieldMask.pbobjc.m
@@ -11,11 +11,14 @@
@end
+#pragma mark - GPBFieldMaskRoot_FileDescriptor
+
static GPBFileDescriptor *GPBFieldMaskRoot_FileDescriptor(void) {
// This is called by +initialize so there is no need to worry
// about thread safety of the singleton.
static GPBFileDescriptor *descriptor = NULL;
if (!descriptor) {
+ GPBDebugCheckRuntimeVersion();
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf"
syntax:GPBFileSyntaxProto3];
}
@@ -26,17 +29,17 @@ static GPBFileDescriptor *GPBFieldMaskRoot_FileDescriptor(void) {
@implementation GPBFieldMask
-@dynamic pathsArray;
+@dynamic pathsArray, pathsArray_Count;
-typedef struct GPBFieldMask_Storage {
+typedef struct GPBFieldMask__storage_ {
uint32_t _has_storage_[1];
NSMutableArray *pathsArray;
-} GPBFieldMask_Storage;
+} GPBFieldMask__storage_;
// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
- static GPBDescriptor *descriptor = NULL;
+ static GPBDescriptor *descriptor = nil;
if (!descriptor) {
static GPBMessageFieldDescription fields[] = {
{
@@ -44,26 +47,29 @@ typedef struct GPBFieldMask_Storage {
.number = GPBFieldMask_FieldNumber_PathsArray,
.hasIndex = GPBNoHasBit,
.flags = GPBFieldRepeated,
- .type = GPBTypeString,
- .offset = offsetof(GPBFieldMask_Storage, pathsArray),
+ .dataType = GPBDataTypeString,
+ .offset = offsetof(GPBFieldMask__storage_, pathsArray),
.defaultValue.valueMessage = nil,
- .typeSpecific.className = NULL,
+ .dataTypeSpecific.className = NULL,
.fieldOptions = NULL,
},
};
- descriptor = [GPBDescriptor allocDescriptorForClass:[GPBFieldMask class]
- rootClass:[GPBFieldMaskRoot class]
- file:GPBFieldMaskRoot_FileDescriptor()
- fields:fields
- fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
- oneofs:NULL
- oneofCount:0
- enums:NULL
- enumCount:0
- ranges:NULL
- rangeCount:0
- storageSize:sizeof(GPBFieldMask_Storage)
- wireFormat:NO];
+ GPBDescriptor *localDescriptor =
+ [GPBDescriptor allocDescriptorForClass:[GPBFieldMask class]
+ rootClass:[GPBFieldMaskRoot class]
+ file:GPBFieldMaskRoot_FileDescriptor()
+ fields:fields
+ fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription)
+ oneofs:NULL
+ oneofCount:0
+ enums:NULL
+ enumCount:0
+ ranges:NULL
+ rangeCount:0
+ storageSize:sizeof(GPBFieldMask__storage_)
+ wireFormat:NO];
+ NSAssert(descriptor == nil, @"Startup recursed!");
+ descriptor = localDescriptor;
}
return descriptor;
}