diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2017-06-06 09:10:27 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2017-06-06 10:44:14 -0400 |
commit | 1d0988b8efcb9eae937eb8438f6dd6b1ef66b6df (patch) | |
tree | c69125a62252aafd67704bfa3a9b80ba23ad5469 /objectivec/GPBMessage.m | |
parent | 516a81a4244d11f0fa6c40f87386a7bc35c37c6a (diff) | |
download | protobuf-1d0988b8efcb9eae937eb8438f6dd6b1ef66b6df.tar.gz protobuf-1d0988b8efcb9eae937eb8438f6dd6b1ef66b6df.tar.bz2 protobuf-1d0988b8efcb9eae937eb8438f6dd6b1ef66b6df.zip |
ObjC: Preserve unknown fields in proto3 syntax files.
As announced: https://groups.google.com/forum/#!topic/protobuf/VX5qEmTW3y0
The ObjC side of https://github.com/google/protobuf/issues/272
Diffstat (limited to 'objectivec/GPBMessage.m')
-rw-r--r-- | objectivec/GPBMessage.m | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m index 627a396e..55c7b308 100644 --- a/objectivec/GPBMessage.m +++ b/objectivec/GPBMessage.m @@ -2372,17 +2372,11 @@ static void MergeRepeatedNotPackedFieldFromCodedInputStream( // zero signals EOF / limit reached return; } else { - if (GPBPreserveUnknownFields(syntax)) { - if (![self parseUnknownField:input - extensionRegistry:extensionRegistry - tag:tag]) { - // it's an endgroup tag - return; - } - } else { - if (![input skipField:tag]) { - return; - } + if (![self parseUnknownField:input + extensionRegistry:extensionRegistry + tag:tag]) { + // it's an endgroup tag + return; } } } // if(!merged) |