diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2015-06-09 17:17:45 -0700 |
---|---|---|
committer | Paul Yang <TeBoring@users.noreply.github.com> | 2015-06-09 17:17:45 -0700 |
commit | fb466c13a7c0280fdc30acf86d3b29235a904ba5 (patch) | |
tree | 938c7b2e06268887d766a4ac03d24fcb89f21ef8 /objectivec/GPBWireFormat.m | |
parent | fd73235f6b2534aa63af41359d9f386ade43a5cc (diff) | |
parent | d846b0b059b4d867536b98aa29475a387aa09114 (diff) | |
download | protobuf-fb466c13a7c0280fdc30acf86d3b29235a904ba5.tar.gz protobuf-fb466c13a7c0280fdc30acf86d3b29235a904ba5.tar.bz2 protobuf-fb466c13a7c0280fdc30acf86d3b29235a904ba5.zip |
Merge pull request #480 from thomasvl/objc_beta_drop
Beta quality drop of Objective C Support.
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]; } |