aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/GPBProtocolBuffers.m
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-06-21 08:25:28 -0400
committerGravatar GitHub <noreply@github.com>2016-06-21 08:25:28 -0400
commita230b5d20949d9ba5b31f4d762ae88af4c5ee8f5 (patch)
treec23ee0a40e93ac514c48413b6b0c3129a28aec97 /objectivec/GPBProtocolBuffers.m
parent1a5333b8c176df60a30d8dce77bb35abdabff905 (diff)
Rename methods to avoid ObjC KVC collisions. (#1699)
Note: Breaking API change on the Dictionary classes. The numeric value classes were using "Value" in the naming, but this silently collided with the KVC category on NSObject; meaning KVC code could break up a keypath and call these selectors with the wrong types leading to crashes (even though the code all would compile cleanly). - Rename the methods to use the "type" instead of literal "Value". - Update all the impls and tests. - Enable the warning that will catch issues like this in the future. Fixes https://github.com/google/protobuf/issues/1616
Diffstat (limited to 'objectivec/GPBProtocolBuffers.m')
-rw-r--r--objectivec/GPBProtocolBuffers.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/objectivec/GPBProtocolBuffers.m b/objectivec/GPBProtocolBuffers.m
index 8512af7e..73939391 100644
--- a/objectivec/GPBProtocolBuffers.m
+++ b/objectivec/GPBProtocolBuffers.m
@@ -31,6 +31,14 @@
// If you want to build protocol buffers in your own project without adding the
// project dependency, you can just add this file.
+
+// This warning seems to treat code differently when it is #imported than when
+// it is inline in the file. GPBDictionary.m compiles cleanly in other targets,
+// but when #imported here it triggers a bunch of warnings that don't make
+// much sense, and don't trigger when compiled directly. So we shut off the
+// warnings here.
+#pragma clang diagnostic ignored "-Wnullability-completeness"
+
#import "GPBArray.m"
#import "GPBCodedInputStream.m"
#import "GPBCodedOutputStream.m"