diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2015-06-08 16:24:57 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2015-06-08 17:17:22 -0400 |
commit | d846b0b059b4d867536b98aa29475a387aa09114 (patch) | |
tree | 25ebf99cd0462281add17fc94bdf185e5fd9096c /objectivec/GPBWireFormat.m | |
parent | 3f9be70d067fb03cd03f99522473dee265b84ddb (diff) | |
download | protobuf-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/GPBWireFormat.m')
-rw-r--r-- | objectivec/GPBWireFormat.m | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/objectivec/GPBWireFormat.m b/objectivec/GPBWireFormat.m index 7435221f..193235d6 100644 --- a/objectivec/GPBWireFormat.m +++ b/objectivec/GPBWireFormat.m @@ -49,30 +49,30 @@ uint32_t GPBWireFormatGetTagFieldNumber(uint32_t tag) { 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]; } |