aboutsummaryrefslogtreecommitdiff
path: root/objectivec/GPBMessage.m
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2017-06-06 09:10:27 -0400
committerThomas Van Lenten <thomasvl@google.com>2017-06-06 10:44:14 -0400
commit1d0988b8efcb9eae937eb8438f6dd6b1ef66b6df (patch)
treec69125a62252aafd67704bfa3a9b80ba23ad5469 /objectivec/GPBMessage.m
parent516a81a4244d11f0fa6c40f87386a7bc35c37c6a (diff)
downloadprotobuf-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.m16
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)