Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
50 lines
1.5 KiB
1 year ago
|
// Protocol Buffers - Google's data interchange format
|
||
|
// Copyright 2023 Google LLC. All rights reserved.
|
||
|
//
|
||
1 year ago
|
// Use of this source code is governed by a BSD-style
|
||
|
// license that can be found in the LICENSE file or at
|
||
|
// https://developers.google.com/open-source/licenses/bsd
|
||
3 years ago
|
|
||
10 months ago
|
#ifndef UPB_MESSAGE_INTERNAL_COMPARE_UNKNOWN_H_
|
||
|
#define UPB_MESSAGE_INTERNAL_COMPARE_UNKNOWN_H_
|
||
3 years ago
|
|
||
2 years ago
|
#include <stddef.h>
|
||
3 years ago
|
|
||
10 months ago
|
// Must be last.
|
||
|
#include "upb/port/def.inc"
|
||
|
|
||
3 years ago
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
// Returns true if unknown fields from the two messages are equal when sorted
|
||
|
// and varints are made canonical.
|
||
|
//
|
||
3 years ago
|
// This function is discouraged, as the comparison is inherently lossy without
|
||
|
// schema data:
|
||
3 years ago
|
//
|
||
3 years ago
|
// 1. We don't know whether delimited fields are sub-messages. Unknown
|
||
|
// sub-messages will therefore not have their fields sorted and varints
|
||
|
// canonicalized.
|
||
|
// 2. We don't know about oneof/non-repeated fields, which should semantically
|
||
|
// discard every value except the last.
|
||
3 years ago
|
|
||
3 years ago
|
typedef enum {
|
||
3 years ago
|
kUpb_UnknownCompareResult_Equal = 0,
|
||
|
kUpb_UnknownCompareResult_NotEqual = 1,
|
||
|
kUpb_UnknownCompareResult_OutOfMemory = 2,
|
||
|
kUpb_UnknownCompareResult_MaxDepthExceeded = 3,
|
||
3 years ago
|
} upb_UnknownCompareResult;
|
||
3 years ago
|
|
||
10 months ago
|
upb_UnknownCompareResult UPB_PRIVATE(_upb_Message_UnknownFieldsAreEqual)(
|
||
|
const char* buf1, size_t size1, const char* buf2, size_t size2,
|
||
|
int max_depth);
|
||
3 years ago
|
|
||
|
#ifdef __cplusplus
|
||
3 years ago
|
} /* extern "C" */
|
||
3 years ago
|
#endif
|
||
|
|
||
10 months ago
|
#include "upb/port/undef.inc"
|
||
|
|
||
|
#endif /* UPB_MESSAGE_INTERNAL_COMPARE_UNKNOWN_H_ */
|