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.
diff --git a/objectivec/GPBWireFormat.m b/objectivec/GPBWireFormat.m
index 7435221..193235d 100644
--- a/objectivec/GPBWireFormat.m
+++ b/objectivec/GPBWireFormat.m
@@ -49,30 +49,30 @@
return GPBLogicalRightShift32(tag, GPBWireFormatTagTypeBits);
}
-GPBWireFormat GPBWireFormatForType(GPBType type, BOOL isPacked) {
+GPBWireFormat GPBWireFormatForType(GPBDataType type, BOOL isPacked) {
if (isPacked) {
return GPBWireFormatLengthDelimited;
}
- static const GPBWireFormat format[GPBTypeCount] = {
- GPBWireFormatVarint, // GPBTypeBool
- GPBWireFormatFixed32, // GPBTypeFixed32
- GPBWireFormatFixed32, // GPBTypeSFixed32
- GPBWireFormatFixed32, // GPBTypeFloat
- GPBWireFormatFixed64, // GPBTypeFixed64
- GPBWireFormatFixed64, // GPBTypeSFixed64
- GPBWireFormatFixed64, // GPBTypeDouble
- GPBWireFormatVarint, // GPBTypeInt32
- GPBWireFormatVarint, // GPBTypeInt64
- GPBWireFormatVarint, // GPBTypeSInt32
- GPBWireFormatVarint, // GPBTypeSInt64
- GPBWireFormatVarint, // GPBTypeUInt32
- GPBWireFormatVarint, // GPBTypeUInt64
- GPBWireFormatLengthDelimited, // GPBTypeBytes
- GPBWireFormatLengthDelimited, // GPBTypeString
- GPBWireFormatLengthDelimited, // GPBTypeMessage
- GPBWireFormatStartGroup, // GPBTypeGroup
- GPBWireFormatVarint // GPBTypeEnum
+ static const GPBWireFormat format[GPBDataType_Count] = {
+ GPBWireFormatVarint, // GPBDataTypeBool
+ GPBWireFormatFixed32, // GPBDataTypeFixed32
+ GPBWireFormatFixed32, // GPBDataTypeSFixed32
+ GPBWireFormatFixed32, // GPBDataTypeFloat
+ GPBWireFormatFixed64, // GPBDataTypeFixed64
+ GPBWireFormatFixed64, // GPBDataTypeSFixed64
+ GPBWireFormatFixed64, // GPBDataTypeDouble
+ GPBWireFormatVarint, // GPBDataTypeInt32
+ GPBWireFormatVarint, // GPBDataTypeInt64
+ GPBWireFormatVarint, // GPBDataTypeSInt32
+ GPBWireFormatVarint, // GPBDataTypeSInt64
+ GPBWireFormatVarint, // GPBDataTypeUInt32
+ GPBWireFormatVarint, // GPBDataTypeUInt64
+ GPBWireFormatLengthDelimited, // GPBDataTypeBytes
+ GPBWireFormatLengthDelimited, // GPBDataTypeString
+ GPBWireFormatLengthDelimited, // GPBDataTypeMessage
+ GPBWireFormatStartGroup, // GPBDataTypeGroup
+ GPBWireFormatVarint // GPBDataTypeEnum
};
return format[type];
}