Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: third_party/protobuf/objectivec/GPBWireFormat.h

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/objectivec/GPBWireFormat.h
diff --git a/third_party/protobuf/python/google/protobuf/internal/more_extensions.proto b/third_party/protobuf/objectivec/GPBWireFormat.h
similarity index 54%
copy from third_party/protobuf/python/google/protobuf/internal/more_extensions.proto
copy to third_party/protobuf/objectivec/GPBWireFormat.h
index e2d97010450d32f2d1dd7b3ec0d2d05bf93435cb..29cf2f0b8d0368a99d63cfffebf7d037b4ed06f4 100644
--- a/third_party/protobuf/python/google/protobuf/internal/more_extensions.proto
+++ b/third_party/protobuf/objectivec/GPBWireFormat.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
+// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -28,31 +28,45 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Author: robinson@google.com (Will Robinson)
+#import "GPBRuntimeTypes.h"
+CF_EXTERN_C_BEGIN
-package google.protobuf.internal;
+NS_ASSUME_NONNULL_BEGIN
+typedef enum {
+ GPBWireFormatVarint = 0,
+ GPBWireFormatFixed64 = 1,
+ GPBWireFormatLengthDelimited = 2,
+ GPBWireFormatStartGroup = 3,
+ GPBWireFormatEndGroup = 4,
+ GPBWireFormatFixed32 = 5,
+} GPBWireFormat;
-message TopLevelMessage {
- optional ExtendedMessage submessage = 1;
-}
+enum {
+ GPBWireFormatMessageSetItem = 1,
+ GPBWireFormatMessageSetTypeId = 2,
+ GPBWireFormatMessageSetMessage = 3
+};
+uint32_t GPBWireFormatMakeTag(uint32_t fieldNumber, GPBWireFormat wireType)
+ __attribute__((const));
+GPBWireFormat GPBWireFormatGetTagWireType(uint32_t tag) __attribute__((const));
+uint32_t GPBWireFormatGetTagFieldNumber(uint32_t tag) __attribute__((const));
-message ExtendedMessage {
- extensions 1 to max;
-}
+GPBWireFormat GPBWireFormatForType(GPBDataType dataType, BOOL isPacked)
+ __attribute__((const));
+#define GPBWireFormatMessageSetItemTag \
+ (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatStartGroup))
+#define GPBWireFormatMessageSetItemEndTag \
+ (GPBWireFormatMakeTag(GPBWireFormatMessageSetItem, GPBWireFormatEndGroup))
+#define GPBWireFormatMessageSetTypeIdTag \
+ (GPBWireFormatMakeTag(GPBWireFormatMessageSetTypeId, GPBWireFormatVarint))
+#define GPBWireFormatMessageSetMessageTag \
+ (GPBWireFormatMakeTag(GPBWireFormatMessageSetMessage, \
+ GPBWireFormatLengthDelimited))
-message ForeignMessage {
- optional int32 foreign_message_int = 1;
-}
+NS_ASSUME_NONNULL_END
-
-extend ExtendedMessage {
- optional int32 optional_int_extension = 1;
- optional ForeignMessage optional_message_extension = 2;
-
- repeated int32 repeated_int_extension = 3;
- repeated ForeignMessage repeated_message_extension = 4;
-}
+CF_EXTERN_C_END
« no previous file with comments | « third_party/protobuf/objectivec/GPBWellKnownTypes.m ('k') | third_party/protobuf/objectivec/GPBWireFormat.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698