updated protobuf to 3.18.1
This commit is contained in:
56
external/include/google/protobuf/wire_format.h
vendored
56
external/include/google/protobuf/wire_format.h
vendored
@@ -132,8 +132,8 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
"originally expected. Perhaps it was modified by another thread "
|
||||
"during serialization?";
|
||||
}
|
||||
static uint8* _InternalSerialize(const Message& message, uint8* target,
|
||||
io::EpsCopyOutputStream* stream);
|
||||
static uint8_t* _InternalSerialize(const Message& message, uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream);
|
||||
|
||||
// Implements Message::ByteSize() via reflection. WARNING: The result
|
||||
// of this method is *not* cached anywhere. However, all embedded messages
|
||||
@@ -148,7 +148,7 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
// Skips a field value of the given WireType. The input should start
|
||||
// positioned immediately after the tag. If unknown_fields is non-NULL,
|
||||
// the contents of the field will be added to it.
|
||||
static bool SkipField(io::CodedInputStream* input, uint32 tag,
|
||||
static bool SkipField(io::CodedInputStream* input, uint32_t tag,
|
||||
UnknownFieldSet* unknown_fields);
|
||||
|
||||
// Reads and ignores a message from the input. If unknown_fields is
|
||||
@@ -160,7 +160,7 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
// for which is_valid(value) returns false are appended to
|
||||
// unknown_fields_stream.
|
||||
static bool ReadPackedEnumPreserveUnknowns(io::CodedInputStream* input,
|
||||
uint32 field_number,
|
||||
uint32_t field_number,
|
||||
bool (*is_valid)(int),
|
||||
UnknownFieldSet* unknown_fields,
|
||||
RepeatedField<int>* values);
|
||||
@@ -176,16 +176,16 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
// ComputeUnknownFieldsSize(unknown_fields).
|
||||
//
|
||||
// Returns a pointer past the last written byte.
|
||||
static uint8* SerializeUnknownFieldsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8* target) {
|
||||
static uint8_t* SerializeUnknownFieldsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8_t* target) {
|
||||
io::EpsCopyOutputStream stream(
|
||||
target, static_cast<int>(ComputeUnknownFieldsSize(unknown_fields)),
|
||||
io::CodedOutputStream::IsDefaultSerializationDeterministic());
|
||||
return InternalSerializeUnknownFieldsToArray(unknown_fields, target,
|
||||
&stream);
|
||||
}
|
||||
static uint8* InternalSerializeUnknownFieldsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8* target,
|
||||
static uint8_t* InternalSerializeUnknownFieldsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream);
|
||||
|
||||
// Same thing except for messages that have the message_set_wire_format
|
||||
@@ -200,10 +200,10 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
// ComputeUnknownMessageSetItemsSize(unknown_fields).
|
||||
//
|
||||
// Returns a pointer past the last written byte.
|
||||
static uint8* SerializeUnknownMessageSetItemsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8* target);
|
||||
static uint8* InternalSerializeUnknownMessageSetItemsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8* target,
|
||||
static uint8_t* SerializeUnknownMessageSetItemsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8_t* target);
|
||||
static uint8_t* InternalSerializeUnknownMessageSetItemsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream);
|
||||
|
||||
// Compute the size of the UnknownFieldSet on the wire.
|
||||
@@ -219,12 +219,12 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
//
|
||||
// This is different from MakeTag(field->number(), field->type()) in the
|
||||
// case of packed repeated fields.
|
||||
static uint32 MakeTag(const FieldDescriptor* field);
|
||||
static uint32_t MakeTag(const FieldDescriptor* field);
|
||||
|
||||
// Parse a single field. The input should start out positioned immediately
|
||||
// after the tag.
|
||||
static bool ParseAndMergeField(
|
||||
uint32 tag,
|
||||
uint32_t tag,
|
||||
const FieldDescriptor* field, // May be NULL for unknown
|
||||
Message* message, io::CodedInputStream* input);
|
||||
|
||||
@@ -235,9 +235,9 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
output->SetCur(InternalSerializeField(field, message, output->Cur(),
|
||||
output->EpsCopy()));
|
||||
}
|
||||
static uint8* InternalSerializeField(
|
||||
static uint8_t* InternalSerializeField(
|
||||
const FieldDescriptor* field, // Cannot be NULL
|
||||
const Message& message, uint8* target, io::EpsCopyOutputStream* stream);
|
||||
const Message& message, uint8_t* target, io::EpsCopyOutputStream* stream);
|
||||
|
||||
// Compute size of a single field. If the field is a message type, this
|
||||
// will call ByteSize() for the embedded message, insuring that it caches
|
||||
@@ -255,8 +255,8 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
output->SetCur(InternalSerializeMessageSetItem(
|
||||
field, message, output->Cur(), output->EpsCopy()));
|
||||
}
|
||||
static uint8* InternalSerializeMessageSetItem(
|
||||
const FieldDescriptor* field, const Message& message, uint8* target,
|
||||
static uint8_t* InternalSerializeMessageSetItem(
|
||||
const FieldDescriptor* field, const Message& message, uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream);
|
||||
static size_t MessageSetItemByteSize(const FieldDescriptor* field,
|
||||
const Message& message);
|
||||
@@ -287,18 +287,18 @@ class PROTOBUF_EXPORT WireFormat {
|
||||
struct MessageSetParser;
|
||||
// Skip a MessageSet field.
|
||||
static bool SkipMessageSetField(io::CodedInputStream* input,
|
||||
uint32 field_number,
|
||||
uint32_t field_number,
|
||||
UnknownFieldSet* unknown_fields);
|
||||
|
||||
// Parse a MessageSet field.
|
||||
static bool ParseAndMergeMessageSetField(uint32 field_number,
|
||||
static bool ParseAndMergeMessageSetField(uint32_t field_number,
|
||||
const FieldDescriptor* field,
|
||||
Message* message,
|
||||
io::CodedInputStream* input);
|
||||
// Parses the value from the wire that belongs to tag.
|
||||
static const char* _InternalParseAndMergeField(Message* msg, const char* ptr,
|
||||
internal::ParseContext* ctx,
|
||||
uint64 tag,
|
||||
uint64_t tag,
|
||||
const Reflection* reflection,
|
||||
const FieldDescriptor* field);
|
||||
|
||||
@@ -313,7 +313,7 @@ class PROTOBUF_EXPORT UnknownFieldSetFieldSkipper : public FieldSkipper {
|
||||
~UnknownFieldSetFieldSkipper() override {}
|
||||
|
||||
// implements FieldSkipper -----------------------------------------
|
||||
bool SkipField(io::CodedInputStream* input, uint32 tag) override;
|
||||
bool SkipField(io::CodedInputStream* input, uint32_t tag) override;
|
||||
bool SkipMessage(io::CodedInputStream* input) override;
|
||||
void SkipUnknownEnum(int field_number, int value) override;
|
||||
|
||||
@@ -340,7 +340,7 @@ inline WireFormatLite::WireType WireFormat::WireTypeForFieldType(
|
||||
static_cast<WireFormatLite::FieldType>(implicit_cast<int>(type)));
|
||||
}
|
||||
|
||||
inline uint32 WireFormat::MakeTag(const FieldDescriptor* field) {
|
||||
inline uint32_t WireFormat::MakeTag(const FieldDescriptor* field) {
|
||||
return WireFormatLite::MakeTag(field->number(), WireTypeForField(field));
|
||||
}
|
||||
|
||||
@@ -382,8 +382,8 @@ inline void WireFormat::VerifyUTF8StringNamedField(const char* data, int size,
|
||||
}
|
||||
|
||||
|
||||
inline uint8* InternalSerializeUnknownMessageSetItemsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8* target,
|
||||
inline uint8_t* InternalSerializeUnknownMessageSetItemsToArray(
|
||||
const UnknownFieldSet& unknown_fields, uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream) {
|
||||
return WireFormat::InternalSerializeUnknownMessageSetItemsToArray(
|
||||
unknown_fields, target, stream);
|
||||
@@ -402,9 +402,9 @@ size_t ComputeUnknownFieldsSize(const InternalMetadata& metadata, size_t size,
|
||||
size_t MapKeyDataOnlyByteSize(const FieldDescriptor* field,
|
||||
const MapKey& value);
|
||||
|
||||
uint8* SerializeMapKeyWithCachedSizes(const FieldDescriptor* field,
|
||||
const MapKey& value, uint8* target,
|
||||
io::EpsCopyOutputStream* stream);
|
||||
uint8_t* SerializeMapKeyWithCachedSizes(const FieldDescriptor* field,
|
||||
const MapKey& value, uint8_t* target,
|
||||
io::EpsCopyOutputStream* stream);
|
||||
} // namespace internal
|
||||
} // namespace protobuf
|
||||
} // namespace google
|
||||
|
||||
Reference in New Issue
Block a user