google-protobuf 4.32.1 → 4.33.0.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/google/protobuf_c/ruby-upb.c +251 -74
- data/ext/google/protobuf_c/ruby-upb.h +191 -42
- data/lib/google/protobuf/descriptor_pb.rb +1 -1
- data/lib/google/protobuf/ffi/message.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d48683dcc06cd1c3d32a806bbad5443672b6459e850855df8602a95e7110c31
|
4
|
+
data.tar.gz: aad781681fa866014fde73cce7aca1e4a9cdd740322180781eca7bb91f8c1188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fa2c4dbe224898378e8be46357273cec6c774a3b506f5c9d20fd3ec076d5bd1e733422d47765910eaa123ebb0f27e4ba9f02a0a0a6a2e06f60cdf4823d8904b
|
7
|
+
data.tar.gz: 88acd5eed11ad8ffde8cb8598e74ca0f52bb84fde17d0cea0bad2812ffa7c65ce51b2b6e4e7a37405ee1c347b65f9f6a34569c40d7f281db2de96446cfacbfeb
|
@@ -299,6 +299,12 @@ Error, UINTPTR_MAX is undefined
|
|
299
299
|
#define UPB_ASSERT(expr) assert(expr)
|
300
300
|
#endif
|
301
301
|
|
302
|
+
#if !defined(NDEBUG) && !defined(UPB_TSAN)
|
303
|
+
#define UPB_ENABLE_REF_CYCLE_CHECKS 1
|
304
|
+
#else
|
305
|
+
#define UPB_ENABLE_REF_CYCLE_CHECKS 0
|
306
|
+
#endif
|
307
|
+
|
302
308
|
#if defined(__GNUC__) || defined(__clang__)
|
303
309
|
#define UPB_UNREACHABLE() \
|
304
310
|
do { \
|
@@ -442,12 +448,8 @@ Error, UINTPTR_MAX is undefined
|
|
442
448
|
#if defined(__cplusplus)
|
443
449
|
#if defined(__clang__) || UPB_GNUC_MIN(6, 0)
|
444
450
|
// https://gcc.gnu.org/gcc-6/changes.html
|
445
|
-
#if __cplusplus >= 201402L
|
446
451
|
#define UPB_DEPRECATED [[deprecated]]
|
447
452
|
#else
|
448
|
-
#define UPB_DEPRECATED __attribute__((deprecated))
|
449
|
-
#endif
|
450
|
-
#else
|
451
453
|
#define UPB_DEPRECATED
|
452
454
|
#endif
|
453
455
|
#else
|
@@ -505,8 +507,7 @@ Error, UINTPTR_MAX is undefined
|
|
505
507
|
#if defined(__ELF__) || defined(__wasm__)
|
506
508
|
|
507
509
|
#define UPB_LINKARR_APPEND(name) \
|
508
|
-
__attribute__((
|
509
|
-
section("linkarr_" #name))) UPB_NO_SANITIZE_ADDRESS
|
510
|
+
__attribute__((section("linkarr_" #name))) UPB_NO_SANITIZE_ADDRESS
|
510
511
|
#define UPB_LINKARR_DECLARE(name, type) \
|
511
512
|
extern type __start_linkarr_##name; \
|
512
513
|
extern type __stop_linkarr_##name; \
|
@@ -518,8 +519,7 @@ Error, UINTPTR_MAX is undefined
|
|
518
519
|
|
519
520
|
/* As described in: https://stackoverflow.com/a/22366882 */
|
520
521
|
#define UPB_LINKARR_APPEND(name) \
|
521
|
-
__attribute__((
|
522
|
-
section("__DATA,__la_" #name))) UPB_NO_SANITIZE_ADDRESS
|
522
|
+
__attribute__((section("__DATA,__la_" #name))) UPB_NO_SANITIZE_ADDRESS
|
523
523
|
#define UPB_LINKARR_DECLARE(name, type) \
|
524
524
|
extern type __start_linkarr_##name __asm( \
|
525
525
|
"section$start$__DATA$__la_" #name); \
|
@@ -539,9 +539,8 @@ Error, UINTPTR_MAX is undefined
|
|
539
539
|
|
540
540
|
// Usage of __attribute__ here probably means this is Clang-specific, and would
|
541
541
|
// not work on MSVC.
|
542
|
-
#define UPB_LINKARR_APPEND(name)
|
543
|
-
__declspec(allocate("la_" #name "$j"))
|
544
|
-
__attribute__((retain, used)) UPB_NO_SANITIZE_ADDRESS
|
542
|
+
#define UPB_LINKARR_APPEND(name) \
|
543
|
+
__declspec(allocate("la_" #name "$j")) UPB_NO_SANITIZE_ADDRESS
|
545
544
|
#define UPB_LINKARR_DECLARE(name, type) \
|
546
545
|
__declspec(allocate("la_" #name "$a")) type __start_linkarr_##name; \
|
547
546
|
__declspec(allocate("la_" #name "$z")) type __stop_linkarr_##name; \
|
@@ -5185,10 +5184,22 @@ void upb_Arena_SetMaxBlockSize(size_t max) {
|
|
5185
5184
|
typedef struct upb_MemBlock {
|
5186
5185
|
struct upb_MemBlock* next;
|
5187
5186
|
// Size of the actual allocation.
|
5187
|
+
// Size of 0 means this is a upb_ArenaRef.
|
5188
5188
|
size_t size;
|
5189
5189
|
// Data follows.
|
5190
5190
|
} upb_MemBlock;
|
5191
5191
|
|
5192
|
+
// A special block type that indicates a reference to another arena.
|
5193
|
+
// When this arena is freed, a ref is released on the referenced arena.
|
5194
|
+
// size must be 0.
|
5195
|
+
typedef struct upb_ArenaRef {
|
5196
|
+
upb_MemBlock prefix; // size is always zero
|
5197
|
+
const upb_Arena* arena;
|
5198
|
+
#ifndef NDEBUG
|
5199
|
+
const struct upb_ArenaRef* next_ref;
|
5200
|
+
#endif
|
5201
|
+
} upb_ArenaRef;
|
5202
|
+
|
5192
5203
|
typedef struct upb_ArenaInternal {
|
5193
5204
|
// upb_alloc* together with a low bit which signals if there is an initial
|
5194
5205
|
// block.
|
@@ -5197,6 +5208,12 @@ typedef struct upb_ArenaInternal {
|
|
5197
5208
|
// Linked list of blocks to free/cleanup.
|
5198
5209
|
upb_MemBlock* blocks;
|
5199
5210
|
|
5211
|
+
#ifndef NDEBUG
|
5212
|
+
// Stack of pointers to other arenas that this arena owns.
|
5213
|
+
// Used for debug-only ref cycle checks.
|
5214
|
+
UPB_ATOMIC(const upb_ArenaRef*) refs;
|
5215
|
+
#endif
|
5216
|
+
|
5200
5217
|
// A growing hint of what the *next* block should be sized
|
5201
5218
|
size_t size_hint;
|
5202
5219
|
|
@@ -5255,6 +5272,9 @@ typedef struct {
|
|
5255
5272
|
static const size_t kUpb_MemblockReserve =
|
5256
5273
|
UPB_ALIGN_MALLOC(sizeof(upb_MemBlock));
|
5257
5274
|
|
5275
|
+
static const size_t kUpb_ArenaRefReserve =
|
5276
|
+
UPB_ALIGN_MALLOC(sizeof(upb_ArenaRef));
|
5277
|
+
|
5258
5278
|
// Extracts the (upb_ArenaInternal*) from a (upb_Arena*)
|
5259
5279
|
static upb_ArenaInternal* upb_Arena_Internal(const upb_Arena* a) {
|
5260
5280
|
return &((upb_ArenaState*)a)->body;
|
@@ -5454,6 +5474,43 @@ uint32_t upb_Arena_DebugRefCount(const upb_Arena* a) {
|
|
5454
5474
|
return (uint32_t)_upb_Arena_RefCountFromTagged(tagged);
|
5455
5475
|
}
|
5456
5476
|
|
5477
|
+
#if UPB_ENABLE_REF_CYCLE_CHECKS
|
5478
|
+
|
5479
|
+
bool upb_Arena_HasRefChain(const upb_Arena* from, const upb_Arena* to) {
|
5480
|
+
upb_ArenaInternal* ai = upb_Arena_Internal(from);
|
5481
|
+
upb_ArenaInternal* current;
|
5482
|
+
|
5483
|
+
if (upb_Arena_IsFused(from, to)) return true;
|
5484
|
+
|
5485
|
+
// 1. Traverse backward to the start of a consistent segment.
|
5486
|
+
uintptr_t previous_or_tail =
|
5487
|
+
upb_Atomic_Load(&ai->previous_or_tail, memory_order_acquire);
|
5488
|
+
while (_upb_Arena_IsTaggedPrevious(previous_or_tail)) {
|
5489
|
+
ai = _upb_Arena_PreviousFromTagged(previous_or_tail);
|
5490
|
+
UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(ai));
|
5491
|
+
previous_or_tail =
|
5492
|
+
upb_Atomic_Load(&ai->previous_or_tail, memory_order_acquire);
|
5493
|
+
}
|
5494
|
+
|
5495
|
+
// 2. Traverse forward through all arenas in the fuse group.
|
5496
|
+
current = ai;
|
5497
|
+
while (current != NULL) {
|
5498
|
+
UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(current));
|
5499
|
+
const upb_ArenaRef* ref =
|
5500
|
+
upb_Atomic_Load(¤t->refs, memory_order_acquire);
|
5501
|
+
while (ref != NULL) {
|
5502
|
+
if (ref->arena == to || upb_Arena_HasRefChain(ref->arena, to)) {
|
5503
|
+
return true;
|
5504
|
+
}
|
5505
|
+
ref = ref->next_ref;
|
5506
|
+
}
|
5507
|
+
current = upb_Atomic_Load(¤t->next, memory_order_acquire);
|
5508
|
+
}
|
5509
|
+
return false;
|
5510
|
+
}
|
5511
|
+
|
5512
|
+
#endif
|
5513
|
+
|
5457
5514
|
// Adds an allocated block to the head of the list.
|
5458
5515
|
static void _upb_Arena_AddBlock(upb_Arena* a, void* ptr, size_t offset,
|
5459
5516
|
size_t block_size) {
|
@@ -5588,6 +5645,9 @@ static upb_Arena* _upb_Arena_InitSlow(upb_alloc* alloc, size_t first_size) {
|
|
5588
5645
|
_upb_Arena_TaggedFromTail(&a->body));
|
5589
5646
|
upb_Atomic_Init(&a->body.space_allocated, actual_block_size);
|
5590
5647
|
a->body.blocks = NULL;
|
5648
|
+
#ifndef NDEBUG
|
5649
|
+
a->body.refs = NULL;
|
5650
|
+
#endif
|
5591
5651
|
a->body.upb_alloc_cleanup = NULL;
|
5592
5652
|
UPB_PRIVATE(upb_Xsan_Init)(UPB_XSAN(&a->body));
|
5593
5653
|
|
@@ -5625,6 +5685,9 @@ upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc) {
|
|
5625
5685
|
_upb_Arena_TaggedFromTail(&a->body));
|
5626
5686
|
upb_Atomic_Init(&a->body.space_allocated, 0);
|
5627
5687
|
a->body.blocks = NULL;
|
5688
|
+
#ifndef NDEBUG
|
5689
|
+
a->body.refs = NULL;
|
5690
|
+
#endif
|
5628
5691
|
a->body.size_hint = 128;
|
5629
5692
|
a->body.upb_alloc_cleanup = NULL;
|
5630
5693
|
a->body.block_alloc = _upb_Arena_MakeBlockAlloc(alloc, 1);
|
@@ -5657,7 +5720,14 @@ static void _upb_Arena_DoFree(upb_ArenaInternal* ai) {
|
|
5657
5720
|
while (block != NULL) {
|
5658
5721
|
// Load first since we are deleting block.
|
5659
5722
|
upb_MemBlock* next_block = block->next;
|
5660
|
-
|
5723
|
+
if (block->size == 0) {
|
5724
|
+
// If the block is an arena ref, then we need to release our ref on the
|
5725
|
+
// referenced arena.
|
5726
|
+
upb_ArenaRef* ref = (upb_ArenaRef*)block;
|
5727
|
+
upb_Arena_DecRefFor((upb_Arena*)ref->arena, ai);
|
5728
|
+
} else {
|
5729
|
+
upb_free_sized(block_alloc, block, block->size);
|
5730
|
+
}
|
5661
5731
|
block = next_block;
|
5662
5732
|
}
|
5663
5733
|
if (alloc_cleanup != NULL) {
|
@@ -5932,6 +6002,9 @@ bool upb_Arena_Fuse(const upb_Arena* a1, const upb_Arena* a2) {
|
|
5932
6002
|
while (true) {
|
5933
6003
|
upb_ArenaInternal* new_root = _upb_Arena_DoFuse(&ai1, &ai2, &ref_delta);
|
5934
6004
|
if (new_root != NULL && _upb_Arena_FixupRefs(new_root, ref_delta)) {
|
6005
|
+
#if UPB_ENABLE_REF_CYCLE_CHECKS
|
6006
|
+
UPB_ASSERT(!upb_Arena_HasRefChain(a1, a2));
|
6007
|
+
#endif
|
5935
6008
|
return true;
|
5936
6009
|
}
|
5937
6010
|
}
|
@@ -5981,6 +6054,64 @@ void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner) {
|
|
5981
6054
|
upb_Arena_Free((upb_Arena*)a);
|
5982
6055
|
}
|
5983
6056
|
|
6057
|
+
bool upb_Arena_RefArena(upb_Arena* from, const upb_Arena* to) {
|
6058
|
+
UPB_ASSERT(!upb_Arena_IsFused(from, to));
|
6059
|
+
if (_upb_ArenaInternal_HasInitialBlock(upb_Arena_Internal(to))) {
|
6060
|
+
// We can't increment a ref to `to`, so return early.
|
6061
|
+
return false;
|
6062
|
+
}
|
6063
|
+
|
6064
|
+
upb_ArenaInternal* ai = upb_Arena_Internal(from);
|
6065
|
+
upb_ArenaRef* ref = upb_Arena_Malloc(from, kUpb_ArenaRefReserve);
|
6066
|
+
|
6067
|
+
if (!ref) {
|
6068
|
+
return false;
|
6069
|
+
}
|
6070
|
+
|
6071
|
+
// When 'from' is freed, a ref on 'to' will be released.
|
6072
|
+
// Intentionally ignore return value, since we already check up above if this
|
6073
|
+
// call will succeed.
|
6074
|
+
bool result = upb_Arena_IncRefFor(to, from);
|
6075
|
+
UPB_ASSERT(result);
|
6076
|
+
|
6077
|
+
// When we add a reference from `from` to `to`, we need to keep track of the
|
6078
|
+
// ref in the `from` arena's linked list of refs. This allows us to
|
6079
|
+
// walk all refs for `from` when `from` is freed, and thus allows us to
|
6080
|
+
// decrement the refcount on `to` when `from` is freed.
|
6081
|
+
ref->prefix.next = ai->blocks;
|
6082
|
+
ref->prefix.size = 0;
|
6083
|
+
ref->arena = to;
|
6084
|
+
ai->blocks = (upb_MemBlock*)ref;
|
6085
|
+
|
6086
|
+
#ifndef NDEBUG
|
6087
|
+
// Add to the dedicated list of refs.
|
6088
|
+
// This function is not thread-safe from `from`, so a simple load/store is
|
6089
|
+
// sufficient.
|
6090
|
+
ref->next_ref = upb_Atomic_Load(&ai->refs, memory_order_relaxed);
|
6091
|
+
upb_Atomic_Store(&ai->refs, ref, memory_order_release);
|
6092
|
+
#endif
|
6093
|
+
|
6094
|
+
#if UPB_ENABLE_REF_CYCLE_CHECKS
|
6095
|
+
UPB_ASSERT(!upb_Arena_HasRefChain(to, from)); // Forbid cycles.
|
6096
|
+
#endif
|
6097
|
+
|
6098
|
+
return true;
|
6099
|
+
}
|
6100
|
+
|
6101
|
+
#ifndef NDEBUG
|
6102
|
+
bool upb_Arena_HasRef(const upb_Arena* from, const upb_Arena* to) {
|
6103
|
+
const upb_ArenaInternal* ai = upb_Arena_Internal(from);
|
6104
|
+
const upb_ArenaRef* ref = upb_Atomic_Load(&ai->refs, memory_order_acquire);
|
6105
|
+
while (ref != NULL) {
|
6106
|
+
if (upb_Arena_IsFused(ref->arena, to)) {
|
6107
|
+
return true;
|
6108
|
+
}
|
6109
|
+
ref = ref->next_ref;
|
6110
|
+
}
|
6111
|
+
return false;
|
6112
|
+
}
|
6113
|
+
#endif
|
6114
|
+
|
5984
6115
|
upb_alloc* upb_Arena_GetUpbAlloc(upb_Arena* a) {
|
5985
6116
|
UPB_PRIVATE(upb_Xsan_AccessReadOnly)(UPB_XSAN(a));
|
5986
6117
|
upb_ArenaInternal* ai = upb_Arena_Internal(a);
|
@@ -6005,6 +6136,11 @@ bool _upb_Arena_WasLastAlloc(struct upb_Arena* a, void* ptr, size_t oldsize) {
|
|
6005
6136
|
upb_ArenaInternal* ai = upb_Arena_Internal(a);
|
6006
6137
|
upb_MemBlock* block = ai->blocks;
|
6007
6138
|
if (block == NULL) return false;
|
6139
|
+
// Skip any arena refs.
|
6140
|
+
while (block != NULL && block->size == 0) {
|
6141
|
+
block = block->next;
|
6142
|
+
}
|
6143
|
+
if (block == NULL) return false;
|
6008
6144
|
block = block->next;
|
6009
6145
|
if (block == NULL) return false;
|
6010
6146
|
char* start = UPB_PTR_AT(block, kUpb_MemblockReserve, char);
|
@@ -7146,7 +7282,7 @@ static void upb_CombineUnknownFields(upb_UnknownField_Context* ctx,
|
|
7146
7282
|
// unknown field data is valid, so parse errors here should be impossible.
|
7147
7283
|
while (!upb_EpsCopyInputStream_IsDone(&ctx->stream, &ptr)) {
|
7148
7284
|
uint32_t tag;
|
7149
|
-
ptr = upb_WireReader_ReadTag(ptr, &tag);
|
7285
|
+
ptr = upb_WireReader_ReadTag(ptr, &tag, &ctx->stream);
|
7150
7286
|
UPB_ASSERT(tag <= UINT32_MAX);
|
7151
7287
|
int wire_type = upb_WireReader_GetWireType(tag);
|
7152
7288
|
if (wire_type == kUpb_WireType_EndGroup) break;
|
@@ -7162,20 +7298,22 @@ static void upb_CombineUnknownFields(upb_UnknownField_Context* ctx,
|
|
7162
7298
|
|
7163
7299
|
switch (wire_type) {
|
7164
7300
|
case kUpb_WireType_Varint:
|
7165
|
-
ptr = upb_WireReader_ReadVarint(ptr, &field->data.varint);
|
7301
|
+
ptr = upb_WireReader_ReadVarint(ptr, &field->data.varint, &ctx->stream);
|
7166
7302
|
UPB_ASSERT(ptr);
|
7167
7303
|
break;
|
7168
7304
|
case kUpb_WireType_64Bit:
|
7169
|
-
ptr =
|
7305
|
+
ptr =
|
7306
|
+
upb_WireReader_ReadFixed64(ptr, &field->data.uint64, &ctx->stream);
|
7170
7307
|
UPB_ASSERT(ptr);
|
7171
7308
|
break;
|
7172
7309
|
case kUpb_WireType_32Bit:
|
7173
|
-
ptr =
|
7310
|
+
ptr =
|
7311
|
+
upb_WireReader_ReadFixed32(ptr, &field->data.uint32, &ctx->stream);
|
7174
7312
|
UPB_ASSERT(ptr);
|
7175
7313
|
break;
|
7176
7314
|
case kUpb_WireType_Delimited: {
|
7177
7315
|
int size;
|
7178
|
-
ptr = upb_WireReader_ReadSize(ptr, &size);
|
7316
|
+
ptr = upb_WireReader_ReadSize(ptr, &size, &ctx->stream);
|
7179
7317
|
UPB_ASSERT(ptr);
|
7180
7318
|
const char* s_ptr = ptr;
|
7181
7319
|
ptr = upb_EpsCopyInputStream_ReadStringAliased(&ctx->stream, &s_ptr,
|
@@ -8711,7 +8849,7 @@ static upb_MiniTable* upb_MtDecoder_DoBuildMiniTableWithBuf(
|
|
8711
8849
|
#ifdef UPB_TRACING_ENABLED
|
8712
8850
|
// MiniTables built from MiniDescriptors will not be able to vend the message
|
8713
8851
|
// name unless it is explicitly set with upb_MiniTable_SetFullName().
|
8714
|
-
decoder->table
|
8852
|
+
decoder->table.UPB_PRIVATE(full_name) = 0;
|
8715
8853
|
#endif
|
8716
8854
|
|
8717
8855
|
// Strip off and verify the version tag.
|
@@ -8955,6 +9093,17 @@ bool upb_MiniTable_SetSubEnum(upb_MiniTable* table, upb_MiniTableField* field,
|
|
8955
9093
|
return false;
|
8956
9094
|
}
|
8957
9095
|
|
9096
|
+
if ((table->UPB_PRIVATE(ext) & kUpb_ExtMode_IsMapEntry) &&
|
9097
|
+
!upb_MiniTableEnum_CheckValue(sub, 0)) {
|
9098
|
+
// An enum used in a map must include 0 as a value. This matches a check
|
9099
|
+
// performed in protoc ("Enum value in map must define 0 as the first
|
9100
|
+
// value"). Protoc should ensure that we never get here.
|
9101
|
+
//
|
9102
|
+
// This ends up being important if we receive wire messages where a map
|
9103
|
+
// entry omits the value (and thus defaults to 0).
|
9104
|
+
return false;
|
9105
|
+
}
|
9106
|
+
|
8958
9107
|
upb_MiniTableSub* table_sub =
|
8959
9108
|
(void*)&table->UPB_PRIVATE(subs)[field->UPB_PRIVATE(submsg_index)];
|
8960
9109
|
*table_sub = upb_MiniTableSub_FromEnum(sub);
|
@@ -10110,10 +10259,8 @@ struct upb_EnumDef {
|
|
10110
10259
|
int res_range_count;
|
10111
10260
|
int res_name_count;
|
10112
10261
|
int32_t defaultval;
|
10262
|
+
UPB_DESC(SymbolVisibility) visibility;
|
10113
10263
|
bool is_sorted; // Whether all of the values are defined in ascending order.
|
10114
|
-
#if UINTPTR_MAX == 0xffffffff
|
10115
|
-
uint32_t padding; // Increase size to a multiple of 8.
|
10116
|
-
#endif
|
10117
10264
|
};
|
10118
10265
|
|
10119
10266
|
upb_EnumDef* _upb_EnumDef_At(const upb_EnumDef* e, int i) {
|
@@ -10151,6 +10298,10 @@ const UPB_DESC(FeatureSet) *
|
|
10151
10298
|
return e->resolved_features;
|
10152
10299
|
}
|
10153
10300
|
|
10301
|
+
UPB_DESC(SymbolVisibility) upb_EnumDef_Visibility(const upb_EnumDef* e) {
|
10302
|
+
return e->visibility;
|
10303
|
+
}
|
10304
|
+
|
10154
10305
|
const char* upb_EnumDef_FullName(const upb_EnumDef* e) { return e->full_name; }
|
10155
10306
|
|
10156
10307
|
const char* upb_EnumDef_Name(const upb_EnumDef* e) {
|
@@ -10346,6 +10497,8 @@ static void create_enumdef(upb_DefBuilder* ctx, const char* prefix,
|
|
10346
10497
|
e->res_name_count = n_res_name;
|
10347
10498
|
e->res_names = _upb_EnumReservedNames_New(ctx, n_res_name, res_names);
|
10348
10499
|
|
10500
|
+
e->visibility = UPB_DESC(EnumDescriptorProto_visibility)(enum_proto);
|
10501
|
+
|
10349
10502
|
if (!upb_inttable_compact(&e->iton, ctx->arena)) _upb_DefBuilder_OomErr(ctx);
|
10350
10503
|
|
10351
10504
|
if (upb_EnumDef_IsClosed(e)) {
|
@@ -12763,6 +12916,7 @@ struct upb_MessageDef {
|
|
12763
12916
|
bool in_message_set;
|
12764
12917
|
bool is_sorted;
|
12765
12918
|
upb_WellKnown well_known_type;
|
12919
|
+
UPB_DESC(SymbolVisibility) visibility;
|
12766
12920
|
};
|
12767
12921
|
|
12768
12922
|
static void assign_msg_wellknowntype(upb_MessageDef* m) {
|
@@ -13010,6 +13164,11 @@ upb_WellKnown upb_MessageDef_WellKnownType(const upb_MessageDef* m) {
|
|
13010
13164
|
return m->well_known_type;
|
13011
13165
|
}
|
13012
13166
|
|
13167
|
+
UPB_API UPB_DESC(SymbolVisibility)
|
13168
|
+
upb_MessageDef_Visibility(const upb_MessageDef* m) {
|
13169
|
+
return m->visibility;
|
13170
|
+
}
|
13171
|
+
|
13013
13172
|
bool _upb_MessageDef_InMessageSet(const upb_MessageDef* m) {
|
13014
13173
|
return m->in_message_set;
|
13015
13174
|
}
|
@@ -13450,6 +13609,8 @@ static void create_msgdef(upb_DefBuilder* ctx, const char* prefix,
|
|
13450
13609
|
m->nested_msg_count = n_msg;
|
13451
13610
|
m->nested_msgs =
|
13452
13611
|
_upb_MessageDefs_New(ctx, n_msg, msgs, m->resolved_features, m);
|
13612
|
+
|
13613
|
+
m->visibility = UPB_DESC(DescriptorProto_visibility)(msg_proto);
|
13453
13614
|
}
|
13454
13615
|
|
13455
13616
|
// Allocate and initialize an array of |n| message defs.
|
@@ -14267,6 +14428,11 @@ static google_protobuf_EnumDescriptorProto* enumdef_toproto(upb_ToProto_Context*
|
|
14267
14428
|
upb_EnumDef_Options(e));
|
14268
14429
|
}
|
14269
14430
|
|
14431
|
+
UPB_DESC(SymbolVisibility) visibility = upb_EnumDef_Visibility(e);
|
14432
|
+
if (visibility != UPB_DESC(VISIBILITY_UNSET)) {
|
14433
|
+
google_protobuf_EnumDescriptorProto_set_visibility(proto, visibility);
|
14434
|
+
}
|
14435
|
+
|
14270
14436
|
return proto;
|
14271
14437
|
}
|
14272
14438
|
|
@@ -14362,6 +14528,11 @@ static google_protobuf_DescriptorProto* msgdef_toproto(upb_ToProto_Context* ctx,
|
|
14362
14528
|
upb_MessageDef_Options(m));
|
14363
14529
|
}
|
14364
14530
|
|
14531
|
+
UPB_DESC(SymbolVisibility) visibility = upb_MessageDef_Visibility(m);
|
14532
|
+
if (visibility != UPB_DESC(VISIBILITY_UNSET)) {
|
14533
|
+
google_protobuf_DescriptorProto_set_visibility(proto, visibility);
|
14534
|
+
}
|
14535
|
+
|
14365
14536
|
return proto;
|
14366
14537
|
}
|
14367
14538
|
|
@@ -14636,7 +14807,6 @@ enum {
|
|
14636
14807
|
kUpb_DecodeOp_Scalar1Byte = 0,
|
14637
14808
|
kUpb_DecodeOp_Scalar4Byte = 2,
|
14638
14809
|
kUpb_DecodeOp_Scalar8Byte = 3,
|
14639
|
-
kUpb_DecodeOp_Enum = 1,
|
14640
14810
|
|
14641
14811
|
// Scalar/repeated ops.
|
14642
14812
|
kUpb_DecodeOp_String = 4,
|
@@ -14736,6 +14906,7 @@ static _upb_DecodeLongVarintReturn _upb_Decoder_DecodeLongTag(const char* ptr,
|
|
14736
14906
|
UPB_FORCEINLINE
|
14737
14907
|
const char* _upb_Decoder_DecodeVarint(upb_Decoder* d, const char* ptr,
|
14738
14908
|
uint64_t* val) {
|
14909
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(&d->input, 10);
|
14739
14910
|
uint64_t byte = (uint8_t)*ptr;
|
14740
14911
|
if (UPB_LIKELY((byte & 0x80) == 0)) {
|
14741
14912
|
*val = byte;
|
@@ -14751,6 +14922,7 @@ const char* _upb_Decoder_DecodeVarint(upb_Decoder* d, const char* ptr,
|
|
14751
14922
|
UPB_FORCEINLINE
|
14752
14923
|
const char* _upb_Decoder_DecodeTag(upb_Decoder* d, const char* ptr,
|
14753
14924
|
uint32_t* val) {
|
14925
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(&d->input, 5);
|
14754
14926
|
uint64_t byte = (uint8_t)*ptr;
|
14755
14927
|
if (UPB_LIKELY((byte & 0x80) == 0)) {
|
14756
14928
|
*val = byte;
|
@@ -14782,8 +14954,8 @@ static void _upb_Decoder_MungeInt32(wireval* val) {
|
|
14782
14954
|
}
|
14783
14955
|
}
|
14784
14956
|
|
14785
|
-
static void _upb_Decoder_Munge(
|
14786
|
-
switch (
|
14957
|
+
static void _upb_Decoder_Munge(const upb_MiniTableField* field, wireval* val) {
|
14958
|
+
switch (field->UPB_PRIVATE(descriptortype)) {
|
14787
14959
|
case kUpb_FieldType_Bool:
|
14788
14960
|
val->bool_val = val->uint64_val != 0;
|
14789
14961
|
break;
|
@@ -14799,9 +14971,10 @@ static void _upb_Decoder_Munge(int type, wireval* val) {
|
|
14799
14971
|
}
|
14800
14972
|
case kUpb_FieldType_Int32:
|
14801
14973
|
case kUpb_FieldType_UInt32:
|
14802
|
-
case kUpb_FieldType_Enum:
|
14803
14974
|
_upb_Decoder_MungeInt32(val);
|
14804
14975
|
break;
|
14976
|
+
case kUpb_FieldType_Enum:
|
14977
|
+
UPB_UNREACHABLE();
|
14805
14978
|
}
|
14806
14979
|
}
|
14807
14980
|
|
@@ -14946,13 +15119,9 @@ static char* upb_Decoder_EncodeVarint32(uint32_t val, char* ptr) {
|
|
14946
15119
|
}
|
14947
15120
|
|
14948
15121
|
UPB_FORCEINLINE
|
14949
|
-
|
14950
|
-
|
14951
|
-
|
14952
|
-
const uint32_t v = val->uint32_val;
|
14953
|
-
|
14954
|
-
if (UPB_LIKELY(upb_MiniTableEnum_CheckValue(e, v))) return true;
|
14955
|
-
|
15122
|
+
void _upb_Decoder_AddEnumValueToUnknown(upb_Decoder* d, upb_Message* msg,
|
15123
|
+
const upb_MiniTableField* field,
|
15124
|
+
wireval* val) {
|
14956
15125
|
// Unrecognized enum goes into unknown fields.
|
14957
15126
|
// For packed fields the tag could be arbitrarily far in the past,
|
14958
15127
|
// so we just re-encode the tag and value here.
|
@@ -14964,27 +15133,12 @@ bool _upb_Decoder_CheckEnum(upb_Decoder* d, const char* ptr, upb_Message* msg,
|
|
14964
15133
|
char buf[2 * kUpb_Decoder_EncodeVarint32MaxSize];
|
14965
15134
|
char* end = buf;
|
14966
15135
|
end = upb_Decoder_EncodeVarint32(tag, end);
|
14967
|
-
end = upb_Decoder_EncodeVarint32(
|
15136
|
+
end = upb_Decoder_EncodeVarint32(val->uint64_val, end);
|
14968
15137
|
|
14969
15138
|
if (!UPB_PRIVATE(_upb_Message_AddUnknown)(unknown_msg, buf, end - buf,
|
14970
15139
|
&d->arena, NULL)) {
|
14971
15140
|
_upb_Decoder_ErrorJmp(d, kUpb_DecodeStatus_OutOfMemory);
|
14972
15141
|
}
|
14973
|
-
return false;
|
14974
|
-
}
|
14975
|
-
|
14976
|
-
UPB_NOINLINE
|
14977
|
-
static const char* _upb_Decoder_DecodeEnumArray(
|
14978
|
-
upb_Decoder* d, const char* ptr, upb_Message* msg, upb_Array* arr,
|
14979
|
-
const upb_MiniTableSubInternal* subs, const upb_MiniTableField* field,
|
14980
|
-
wireval* val) {
|
14981
|
-
const upb_MiniTableEnum* e = _upb_MiniTableSubs_EnumByField(subs, field);
|
14982
|
-
if (!_upb_Decoder_CheckEnum(d, ptr, msg, e, field, val)) return ptr;
|
14983
|
-
void* mem = UPB_PTR_AT(upb_Array_MutableDataPtr(arr),
|
14984
|
-
arr->UPB_PRIVATE(size) * 4, void);
|
14985
|
-
arr->UPB_PRIVATE(size)++;
|
14986
|
-
memcpy(mem, val, 4);
|
14987
|
-
return ptr;
|
14988
15142
|
}
|
14989
15143
|
|
14990
15144
|
UPB_FORCEINLINE
|
@@ -15011,11 +15165,11 @@ const char* _upb_Decoder_DecodeFixedPacked(upb_Decoder* d, const char* ptr,
|
|
15011
15165
|
char* dst = mem;
|
15012
15166
|
while (!_upb_Decoder_IsDone(d, &ptr)) {
|
15013
15167
|
if (lg2 == 2) {
|
15014
|
-
ptr = upb_WireReader_ReadFixed32(ptr, dst);
|
15168
|
+
ptr = upb_WireReader_ReadFixed32(ptr, dst, &d->input);
|
15015
15169
|
dst += 4;
|
15016
15170
|
} else {
|
15017
15171
|
UPB_ASSERT(lg2 == 3);
|
15018
|
-
ptr = upb_WireReader_ReadFixed64(ptr, dst);
|
15172
|
+
ptr = upb_WireReader_ReadFixed64(ptr, dst, &d->input);
|
15019
15173
|
dst += 8;
|
15020
15174
|
}
|
15021
15175
|
}
|
@@ -15037,7 +15191,7 @@ const char* _upb_Decoder_DecodeVarintPacked(upb_Decoder* d, const char* ptr,
|
|
15037
15191
|
while (!_upb_Decoder_IsDone(d, &ptr)) {
|
15038
15192
|
wireval elem;
|
15039
15193
|
ptr = _upb_Decoder_DecodeVarint(d, ptr, &elem.uint64_val);
|
15040
|
-
_upb_Decoder_Munge(field
|
15194
|
+
_upb_Decoder_Munge(field, &elem);
|
15041
15195
|
if (_upb_Decoder_Reserve(d, arr, 1)) {
|
15042
15196
|
out = UPB_PTR_AT(upb_Array_MutableDataPtr(arr),
|
15043
15197
|
arr->UPB_PRIVATE(size) << lg2, void);
|
@@ -15062,8 +15216,8 @@ static const char* _upb_Decoder_DecodeEnumPacked(
|
|
15062
15216
|
while (!_upb_Decoder_IsDone(d, &ptr)) {
|
15063
15217
|
wireval elem;
|
15064
15218
|
ptr = _upb_Decoder_DecodeVarint(d, ptr, &elem.uint64_val);
|
15065
|
-
|
15066
|
-
|
15219
|
+
if (!upb_MiniTableEnum_CheckValue(e, elem.uint64_val)) {
|
15220
|
+
_upb_Decoder_AddEnumValueToUnknown(d, msg, field, &elem);
|
15067
15221
|
continue;
|
15068
15222
|
}
|
15069
15223
|
if (_upb_Decoder_Reserve(d, arr, 1)) {
|
@@ -15146,8 +15300,6 @@ static const char* _upb_Decoder_DecodeToArray(
|
|
15146
15300
|
case OP_VARPCK_LG2(3):
|
15147
15301
|
return _upb_Decoder_DecodeVarintPacked(d, ptr, arr, val, field,
|
15148
15302
|
op - OP_VARPCK_LG2(0));
|
15149
|
-
case kUpb_DecodeOp_Enum:
|
15150
|
-
return _upb_Decoder_DecodeEnumArray(d, ptr, msg, arr, subs, field, val);
|
15151
15303
|
case kUpb_DecodeOp_PackedEnum:
|
15152
15304
|
return _upb_Decoder_DecodeEnumPacked(d, ptr, msg, arr, subs, field, val);
|
15153
15305
|
default:
|
@@ -15271,13 +15423,6 @@ static const char* _upb_Decoder_DecodeToSubMessage(
|
|
15271
15423
|
void* mem = UPB_PTR_AT(msg, field->UPB_PRIVATE(offset), void);
|
15272
15424
|
int type = field->UPB_PRIVATE(descriptortype);
|
15273
15425
|
|
15274
|
-
if (UPB_UNLIKELY(op == kUpb_DecodeOp_Enum) &&
|
15275
|
-
!_upb_Decoder_CheckEnum(d, ptr, msg,
|
15276
|
-
_upb_MiniTableSubs_EnumByField(subs, field),
|
15277
|
-
field, val)) {
|
15278
|
-
return ptr;
|
15279
|
-
}
|
15280
|
-
|
15281
15426
|
// Set presence if necessary.
|
15282
15427
|
if (UPB_PRIVATE(_upb_MiniTableField_HasHasbit)(field)) {
|
15283
15428
|
UPB_PRIVATE(_upb_Message_SetHasbit)(msg, field);
|
@@ -15317,7 +15462,6 @@ static const char* _upb_Decoder_DecodeToSubMessage(
|
|
15317
15462
|
case kUpb_DecodeOp_Scalar8Byte:
|
15318
15463
|
memcpy(mem, val, 8);
|
15319
15464
|
break;
|
15320
|
-
case kUpb_DecodeOp_Enum:
|
15321
15465
|
case kUpb_DecodeOp_Scalar4Byte:
|
15322
15466
|
memcpy(mem, val, 4);
|
15323
15467
|
break;
|
@@ -15374,10 +15518,9 @@ static void upb_Decoder_AddKnownMessageSetItem(
|
|
15374
15518
|
upb_Message* submsg = _upb_Decoder_NewSubMessage2(
|
15375
15519
|
d, ext->ext->UPB_PRIVATE(sub).UPB_PRIVATE(submsg),
|
15376
15520
|
&ext->ext->UPB_PRIVATE(field), &ext->data.tagged_msg_val);
|
15377
|
-
upb_DecodeStatus status =
|
15378
|
-
|
15379
|
-
|
15380
|
-
d->extreg, d->options, &d->arena);
|
15521
|
+
upb_DecodeStatus status = upb_Decode(
|
15522
|
+
data, size, submsg, upb_MiniTableExtension_GetSubMessage(item_mt),
|
15523
|
+
d->extreg, d->options, &d->arena);
|
15381
15524
|
if (status != kUpb_DecodeStatus_Ok) _upb_Decoder_ErrorJmp(d, status);
|
15382
15525
|
}
|
15383
15526
|
|
@@ -15451,7 +15594,7 @@ static const char* upb_Decoder_DecodeMessageSetItem(
|
|
15451
15594
|
case kMessageTag: {
|
15452
15595
|
uint32_t size;
|
15453
15596
|
ptr = upb_Decoder_DecodeSize(d, ptr, &size);
|
15454
|
-
const char* data = ptr;
|
15597
|
+
const char* data = upb_EpsCopyInputStream_GetInputPtr(&d->input, ptr);
|
15455
15598
|
ptr += size;
|
15456
15599
|
if (state_mask & kUpb_HavePayload) break; // Ignore dup.
|
15457
15600
|
state_mask |= kUpb_HavePayload;
|
@@ -15532,7 +15675,7 @@ static int _upb_Decoder_GetVarintOp(const upb_MiniTableField* field) {
|
|
15532
15675
|
[kUpb_FieldType_Message] = kUpb_DecodeOp_UnknownField,
|
15533
15676
|
[kUpb_FieldType_Bytes] = kUpb_DecodeOp_UnknownField,
|
15534
15677
|
[kUpb_FieldType_UInt32] = kUpb_DecodeOp_Scalar4Byte,
|
15535
|
-
[kUpb_FieldType_Enum] =
|
15678
|
+
[kUpb_FieldType_Enum] = kUpb_DecodeOp_Scalar4Byte,
|
15536
15679
|
[kUpb_FieldType_SFixed32] = kUpb_DecodeOp_UnknownField,
|
15537
15680
|
[kUpb_FieldType_SFixed64] = kUpb_DecodeOp_UnknownField,
|
15538
15681
|
[kUpb_FieldType_SInt32] = kUpb_DecodeOp_Scalar4Byte,
|
@@ -15658,21 +15801,33 @@ const char* _upb_Decoder_DecodeWireValue(upb_Decoder* d, const char* ptr,
|
|
15658
15801
|
switch (wire_type) {
|
15659
15802
|
case kUpb_WireType_Varint:
|
15660
15803
|
ptr = _upb_Decoder_DecodeVarint(d, ptr, &val->uint64_val);
|
15804
|
+
if (upb_MiniTableField_IsClosedEnum(field)) {
|
15805
|
+
const upb_MiniTableEnum* e =
|
15806
|
+
upb_MiniTableField_IsExtension(field)
|
15807
|
+
? upb_MiniTableExtension_GetSubEnum(
|
15808
|
+
(const upb_MiniTableExtension*)field)
|
15809
|
+
: upb_MiniTable_GetSubEnumTable(mt, field);
|
15810
|
+
if (!upb_MiniTableEnum_CheckValue(e, val->uint64_val)) {
|
15811
|
+
*op = kUpb_DecodeOp_UnknownField;
|
15812
|
+
return ptr;
|
15813
|
+
}
|
15814
|
+
} else {
|
15815
|
+
_upb_Decoder_Munge(field, val);
|
15816
|
+
}
|
15661
15817
|
*op = _upb_Decoder_GetVarintOp(field);
|
15662
|
-
_upb_Decoder_Munge(field->UPB_PRIVATE(descriptortype), val);
|
15663
15818
|
return ptr;
|
15664
15819
|
case kUpb_WireType_32Bit:
|
15665
15820
|
*op = kUpb_DecodeOp_Scalar4Byte;
|
15666
15821
|
if (((1 << field->UPB_PRIVATE(descriptortype)) & kFixed32OkMask) == 0) {
|
15667
15822
|
*op = kUpb_DecodeOp_UnknownField;
|
15668
15823
|
}
|
15669
|
-
return upb_WireReader_ReadFixed32(ptr, &val->uint32_val);
|
15824
|
+
return upb_WireReader_ReadFixed32(ptr, &val->uint32_val, &d->input);
|
15670
15825
|
case kUpb_WireType_64Bit:
|
15671
15826
|
*op = kUpb_DecodeOp_Scalar8Byte;
|
15672
15827
|
if (((1 << field->UPB_PRIVATE(descriptortype)) & kFixed64OkMask) == 0) {
|
15673
15828
|
*op = kUpb_DecodeOp_UnknownField;
|
15674
15829
|
}
|
15675
|
-
return upb_WireReader_ReadFixed64(ptr, &val->uint64_val);
|
15830
|
+
return upb_WireReader_ReadFixed64(ptr, &val->uint64_val, &d->input);
|
15676
15831
|
case kUpb_WireType_Delimited:
|
15677
15832
|
ptr = upb_Decoder_DecodeSize(d, ptr, &val->size);
|
15678
15833
|
*op = _upb_Decoder_GetDelimitedOp(d, mt, field);
|
@@ -16894,7 +17049,8 @@ const char* _upb_EpsCopyInputStream_IsDoneFallbackNoCallback(
|
|
16894
17049
|
// Must be last.
|
16895
17050
|
|
16896
17051
|
UPB_NOINLINE UPB_PRIVATE(_upb_WireReader_LongVarint)
|
16897
|
-
UPB_PRIVATE(
|
17052
|
+
UPB_PRIVATE(_upb_WireReader_ReadLongVarint64)(const char* ptr,
|
17053
|
+
uint64_t val) {
|
16898
17054
|
UPB_PRIVATE(_upb_WireReader_LongVarint) ret = {NULL, 0};
|
16899
17055
|
uint64_t byte;
|
16900
17056
|
for (int i = 1; i < 10; i++) {
|
@@ -16909,6 +17065,23 @@ UPB_NOINLINE UPB_PRIVATE(_upb_WireReader_LongVarint)
|
|
16909
17065
|
return ret;
|
16910
17066
|
}
|
16911
17067
|
|
17068
|
+
UPB_NOINLINE UPB_PRIVATE(_upb_WireReader_LongVarint)
|
17069
|
+
UPB_PRIVATE(_upb_WireReader_ReadLongVarint32)(const char* ptr,
|
17070
|
+
uint32_t val) {
|
17071
|
+
UPB_PRIVATE(_upb_WireReader_LongVarint) ret = {NULL, 0};
|
17072
|
+
uint64_t byte;
|
17073
|
+
for (int i = 1; i < 5; i++) {
|
17074
|
+
byte = (uint8_t)ptr[i];
|
17075
|
+
val += (byte - 1) << (i * 7);
|
17076
|
+
if (!(byte & 0x80)) {
|
17077
|
+
ret.ptr = ptr + i + 1;
|
17078
|
+
ret.val = val;
|
17079
|
+
return ret;
|
17080
|
+
}
|
17081
|
+
}
|
17082
|
+
return ret;
|
17083
|
+
}
|
17084
|
+
|
16912
17085
|
const char* UPB_PRIVATE(_upb_WireReader_SkipGroup)(
|
16913
17086
|
const char* ptr, uint32_t tag, int depth_limit,
|
16914
17087
|
upb_EpsCopyInputStream* stream) {
|
@@ -16916,7 +17089,7 @@ const char* UPB_PRIVATE(_upb_WireReader_SkipGroup)(
|
|
16916
17089
|
uint32_t end_group_tag = (tag & ~7ULL) | kUpb_WireType_EndGroup;
|
16917
17090
|
while (!upb_EpsCopyInputStream_IsDone(stream, &ptr)) {
|
16918
17091
|
uint32_t tag;
|
16919
|
-
ptr = upb_WireReader_ReadTag(ptr, &tag);
|
17092
|
+
ptr = upb_WireReader_ReadTag(ptr, &tag, stream);
|
16920
17093
|
if (!ptr) return NULL;
|
16921
17094
|
if (tag == end_group_tag) return ptr;
|
16922
17095
|
ptr = _upb_WireReader_SkipValue(ptr, tag, depth_limit, stream);
|
@@ -16998,3 +17171,7 @@ const char* UPB_PRIVATE(_upb_WireReader_SkipGroup)(
|
|
16998
17171
|
#undef UPB_HAS_BUILTIN
|
16999
17172
|
#undef UPB_HAS_EXTENSION
|
17000
17173
|
#undef UPB_HAS_FEATURE
|
17174
|
+
#undef UPB_XSAN_MEMBER
|
17175
|
+
#undef UPB_XSAN
|
17176
|
+
#undef UPB_XSAN_STRUCT_SIZE
|
17177
|
+
#undef UPB_ENABLE_REF_CYCLE_CHECKS
|
@@ -300,6 +300,12 @@ Error, UINTPTR_MAX is undefined
|
|
300
300
|
#define UPB_ASSERT(expr) assert(expr)
|
301
301
|
#endif
|
302
302
|
|
303
|
+
#if !defined(NDEBUG) && !defined(UPB_TSAN)
|
304
|
+
#define UPB_ENABLE_REF_CYCLE_CHECKS 1
|
305
|
+
#else
|
306
|
+
#define UPB_ENABLE_REF_CYCLE_CHECKS 0
|
307
|
+
#endif
|
308
|
+
|
303
309
|
#if defined(__GNUC__) || defined(__clang__)
|
304
310
|
#define UPB_UNREACHABLE() \
|
305
311
|
do { \
|
@@ -443,12 +449,8 @@ Error, UINTPTR_MAX is undefined
|
|
443
449
|
#if defined(__cplusplus)
|
444
450
|
#if defined(__clang__) || UPB_GNUC_MIN(6, 0)
|
445
451
|
// https://gcc.gnu.org/gcc-6/changes.html
|
446
|
-
#if __cplusplus >= 201402L
|
447
452
|
#define UPB_DEPRECATED [[deprecated]]
|
448
453
|
#else
|
449
|
-
#define UPB_DEPRECATED __attribute__((deprecated))
|
450
|
-
#endif
|
451
|
-
#else
|
452
454
|
#define UPB_DEPRECATED
|
453
455
|
#endif
|
454
456
|
#else
|
@@ -506,8 +508,7 @@ Error, UINTPTR_MAX is undefined
|
|
506
508
|
#if defined(__ELF__) || defined(__wasm__)
|
507
509
|
|
508
510
|
#define UPB_LINKARR_APPEND(name) \
|
509
|
-
__attribute__((
|
510
|
-
section("linkarr_" #name))) UPB_NO_SANITIZE_ADDRESS
|
511
|
+
__attribute__((section("linkarr_" #name))) UPB_NO_SANITIZE_ADDRESS
|
511
512
|
#define UPB_LINKARR_DECLARE(name, type) \
|
512
513
|
extern type __start_linkarr_##name; \
|
513
514
|
extern type __stop_linkarr_##name; \
|
@@ -519,8 +520,7 @@ Error, UINTPTR_MAX is undefined
|
|
519
520
|
|
520
521
|
/* As described in: https://stackoverflow.com/a/22366882 */
|
521
522
|
#define UPB_LINKARR_APPEND(name) \
|
522
|
-
__attribute__((
|
523
|
-
section("__DATA,__la_" #name))) UPB_NO_SANITIZE_ADDRESS
|
523
|
+
__attribute__((section("__DATA,__la_" #name))) UPB_NO_SANITIZE_ADDRESS
|
524
524
|
#define UPB_LINKARR_DECLARE(name, type) \
|
525
525
|
extern type __start_linkarr_##name __asm( \
|
526
526
|
"section$start$__DATA$__la_" #name); \
|
@@ -540,9 +540,8 @@ Error, UINTPTR_MAX is undefined
|
|
540
540
|
|
541
541
|
// Usage of __attribute__ here probably means this is Clang-specific, and would
|
542
542
|
// not work on MSVC.
|
543
|
-
#define UPB_LINKARR_APPEND(name)
|
544
|
-
__declspec(allocate("la_" #name "$j"))
|
545
|
-
__attribute__((retain, used)) UPB_NO_SANITIZE_ADDRESS
|
543
|
+
#define UPB_LINKARR_APPEND(name) \
|
544
|
+
__declspec(allocate("la_" #name "$j")) UPB_NO_SANITIZE_ADDRESS
|
546
545
|
#define UPB_LINKARR_DECLARE(name, type) \
|
547
546
|
__declspec(allocate("la_" #name "$a")) type __start_linkarr_##name; \
|
548
547
|
__declspec(allocate("la_" #name "$z")) type __stop_linkarr_##name; \
|
@@ -961,7 +960,14 @@ UPB_INLINE void UPB_PRIVATE(upb_Xsan_AccessReadWrite)(upb_Xsan *xsan) {
|
|
961
960
|
//
|
962
961
|
// We need this because the decoder inlines a upb_Arena for performance but
|
963
962
|
// the full struct is not visible outside of arena.c. Yes, I know, it's awful.
|
964
|
-
#
|
963
|
+
#ifndef NDEBUG
|
964
|
+
#define UPB_ARENA_BASE_SIZE_HACK 11
|
965
|
+
#else
|
966
|
+
#define UPB_ARENA_BASE_SIZE_HACK 10
|
967
|
+
#endif
|
968
|
+
|
969
|
+
#define UPB_ARENA_SIZE_HACK \
|
970
|
+
(UPB_ARENA_BASE_SIZE_HACK + (UPB_XSAN_STRUCT_SIZE * 2))
|
965
971
|
|
966
972
|
// LINT.IfChange(upb_Arena)
|
967
973
|
|
@@ -1138,11 +1144,67 @@ bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner);
|
|
1138
1144
|
// This operation is safe to use concurrently from multiple threads.
|
1139
1145
|
void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner);
|
1140
1146
|
|
1147
|
+
// Creates a reference between the arenas `from` and `to`, guaranteeing that
|
1148
|
+
// the latter will not be freed until `from` is freed.
|
1149
|
+
//
|
1150
|
+
// Users must avoid all of the following error conditions, which will be
|
1151
|
+
// checked in debug mode but are UB in opt:
|
1152
|
+
//
|
1153
|
+
// - Creating reference cycles between arenas.
|
1154
|
+
// - Creating a reference between two arenas that are fused, either now
|
1155
|
+
// or in the future.
|
1156
|
+
//
|
1157
|
+
// Creating a reference multiple times between the same two arenas is not UB but
|
1158
|
+
// is considered wasteful and may be disallowed in the future.
|
1159
|
+
//
|
1160
|
+
// Note that fuses can participate in reference cycles. The following set of
|
1161
|
+
// calls creates a cycle A -> B -> C -> A
|
1162
|
+
// Fuse(A, B);
|
1163
|
+
// Ref(B, C);
|
1164
|
+
// Ref(C, A);
|
1165
|
+
//
|
1166
|
+
// From this perspective, the second rule is just a special-case of the first.
|
1167
|
+
// This set of calls is disallowed because it is effectively creating a
|
1168
|
+
// cycle A -> B -> A
|
1169
|
+
// Fuse(A, B);
|
1170
|
+
// Ref(B, A);
|
1171
|
+
//
|
1172
|
+
// Fuse is special because it creates what is effectively a bidirectional
|
1173
|
+
// ref, but it is not considered a cycle and will be collected correctly.
|
1174
|
+
//
|
1175
|
+
// Note that `from` is not `const`, so it may not be called concurrently
|
1176
|
+
// with any other function on `from`.
|
1177
|
+
//
|
1178
|
+
// Returns whether the reference was created successfully.
|
1179
|
+
bool upb_Arena_RefArena(upb_Arena* from, const upb_Arena* to);
|
1180
|
+
|
1181
|
+
#ifndef NDEBUG
|
1182
|
+
// Returns true if upb_Arena_RefArena(from, to) was previously called.
|
1183
|
+
// Note that this does not take fuses into account, and it does not follow
|
1184
|
+
// chains of references; it must have been these two arenas exactly that
|
1185
|
+
// created a reference.
|
1186
|
+
bool upb_Arena_HasRef(const upb_Arena* from, const upb_Arena* to);
|
1187
|
+
#endif
|
1188
|
+
|
1141
1189
|
// This operation is safe to use concurrently from multiple threads.
|
1142
1190
|
uintptr_t upb_Arena_SpaceAllocated(const upb_Arena* a, size_t* fused_count);
|
1143
1191
|
// This operation is safe to use concurrently from multiple threads.
|
1144
1192
|
uint32_t upb_Arena_DebugRefCount(const upb_Arena* a);
|
1145
1193
|
|
1194
|
+
#if UPB_ENABLE_REF_CYCLE_CHECKS
|
1195
|
+
// Returns true if there is a chain of arena refs that spans `from` -> `to`.
|
1196
|
+
// Fused arenas are taken into account; for example, this series of calls
|
1197
|
+
// will cause the function to return true:
|
1198
|
+
//
|
1199
|
+
// 1. upb_Arena_Fuse(a, b)
|
1200
|
+
// 2. upb_Arena_RefArena(from, a)
|
1201
|
+
// 3. upb_Arena_RefArena(b, to)
|
1202
|
+
//
|
1203
|
+
// However this function does not return true if `from` and `to` are directly
|
1204
|
+
// fused.
|
1205
|
+
bool upb_Arena_HasRefChain(const upb_Arena* from, const upb_Arena* to);
|
1206
|
+
#endif
|
1207
|
+
|
1146
1208
|
UPB_API_INLINE upb_Arena* upb_Arena_New(void) {
|
1147
1209
|
return upb_Arena_Init(NULL, 0, &upb_alloc_global);
|
1148
1210
|
}
|
@@ -3209,6 +3271,11 @@ UPB_API_INLINE bool upb_MiniTableExtension_SetSubEnum(
|
|
3209
3271
|
return true;
|
3210
3272
|
}
|
3211
3273
|
|
3274
|
+
UPB_API_INLINE const upb_MiniTableField* upb_MiniTableExtension_ToField(
|
3275
|
+
const struct upb_MiniTableExtension* e) {
|
3276
|
+
return &e->UPB_PRIVATE(field);
|
3277
|
+
}
|
3278
|
+
|
3212
3279
|
UPB_INLINE upb_FieldRep UPB_PRIVATE(_upb_MiniTableExtension_GetRep)(
|
3213
3280
|
const struct upb_MiniTableExtension* e) {
|
3214
3281
|
return UPB_PRIVATE(_upb_MiniTableField_GetRep)(&e->UPB_PRIVATE(field));
|
@@ -3250,6 +3317,9 @@ UPB_API_INLINE bool upb_MiniTableExtension_SetSubMessage(
|
|
3250
3317
|
UPB_API_INLINE bool upb_MiniTableExtension_SetSubEnum(
|
3251
3318
|
upb_MiniTableExtension* e, const upb_MiniTableEnum* m);
|
3252
3319
|
|
3320
|
+
UPB_API_INLINE const upb_MiniTableField* upb_MiniTableExtension_ToField(
|
3321
|
+
const upb_MiniTableExtension* e);
|
3322
|
+
|
3253
3323
|
#ifdef __cplusplus
|
3254
3324
|
} /* extern "C" */
|
3255
3325
|
#endif
|
@@ -5891,7 +5961,8 @@ typedef enum {
|
|
5891
5961
|
kUpb_EncodeStatus_OutOfMemory = 1, // Arena alloc failed
|
5892
5962
|
kUpb_EncodeStatus_MaxDepthExceeded = 2,
|
5893
5963
|
|
5894
|
-
//
|
5964
|
+
// One or more required fields are missing. Only returned if
|
5965
|
+
// kUpb_EncodeOption_CheckRequired is set.
|
5895
5966
|
kUpb_EncodeStatus_MissingRequired = 3,
|
5896
5967
|
} upb_EncodeStatus;
|
5897
5968
|
// LINT.ThenChange(//depot/google3/third_party/protobuf/rust/upb.rs:encode_status)
|
@@ -13403,6 +13474,7 @@ bool upb_EnumDef_MiniDescriptorEncode(const upb_EnumDef* e, upb_Arena* a,
|
|
13403
13474
|
const char* upb_EnumDef_Name(const upb_EnumDef* e);
|
13404
13475
|
const UPB_DESC(EnumOptions) * upb_EnumDef_Options(const upb_EnumDef* e);
|
13405
13476
|
const UPB_DESC(FeatureSet) * upb_EnumDef_ResolvedFeatures(const upb_EnumDef* e);
|
13477
|
+
UPB_DESC(SymbolVisibility) upb_EnumDef_Visibility(const upb_EnumDef* e);
|
13406
13478
|
|
13407
13479
|
upb_StringView upb_EnumDef_ReservedName(const upb_EnumDef* e, int i);
|
13408
13480
|
int upb_EnumDef_ReservedNameCount(const upb_EnumDef* e);
|
@@ -13747,6 +13819,8 @@ int upb_MessageDef_ReservedRangeCount(const upb_MessageDef* m);
|
|
13747
13819
|
|
13748
13820
|
UPB_API upb_Syntax upb_MessageDef_Syntax(const upb_MessageDef* m);
|
13749
13821
|
UPB_API upb_WellKnown upb_MessageDef_WellKnownType(const upb_MessageDef* m);
|
13822
|
+
UPB_API UPB_DESC(SymbolVisibility)
|
13823
|
+
upb_MessageDef_Visibility(const upb_MessageDef* m);
|
13750
13824
|
|
13751
13825
|
#ifdef __cplusplus
|
13752
13826
|
} /* extern "C" */
|
@@ -14660,7 +14734,9 @@ extern "C" {
|
|
14660
14734
|
// stream guarantees that after upb_EpsCopyInputStream_IsDone() is called,
|
14661
14735
|
// the decoder can read this many bytes without performing another bounds
|
14662
14736
|
// check. The stream will copy into a patch buffer as necessary to guarantee
|
14663
|
-
// this invariant.
|
14737
|
+
// this invariant. Since tags can only be up to 5 bytes, and a max-length scalar
|
14738
|
+
// field can be 10 bytes, only 15 is required; but sizing up to 16 permits more
|
14739
|
+
// efficient fixed size copies.
|
14664
14740
|
#define kUpb_EpsCopyInputStream_SlopBytes 16
|
14665
14741
|
|
14666
14742
|
typedef struct {
|
@@ -14671,6 +14747,12 @@ typedef struct {
|
|
14671
14747
|
int limit; // Submessage limit relative to end
|
14672
14748
|
bool error; // To distinguish between EOF and error.
|
14673
14749
|
bool aliasing;
|
14750
|
+
#ifndef NDEBUG
|
14751
|
+
int guaranteed_bytes;
|
14752
|
+
#endif
|
14753
|
+
// Allocate double the size of what's required; this permits a fixed-size copy
|
14754
|
+
// from the input buffer, regardless of how many bytes actually remain in the
|
14755
|
+
// input buffer.
|
14674
14756
|
char patch[kUpb_EpsCopyInputStream_SlopBytes * 2];
|
14675
14757
|
} upb_EpsCopyInputStream;
|
14676
14758
|
|
@@ -14687,6 +14769,32 @@ typedef const char* upb_EpsCopyInputStream_BufferFlipCallback(
|
|
14687
14769
|
typedef const char* upb_EpsCopyInputStream_IsDoneFallbackFunc(
|
14688
14770
|
upb_EpsCopyInputStream* e, const char* ptr, int overrun);
|
14689
14771
|
|
14772
|
+
UPB_INLINE void UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(
|
14773
|
+
upb_EpsCopyInputStream* e) {
|
14774
|
+
#ifndef NDEBUG
|
14775
|
+
e->guaranteed_bytes = kUpb_EpsCopyInputStream_SlopBytes;
|
14776
|
+
#endif
|
14777
|
+
}
|
14778
|
+
|
14779
|
+
UPB_INLINE void UPB_PRIVATE(upb_EpsCopyInputStream_BoundsHit)(
|
14780
|
+
upb_EpsCopyInputStream* e) {
|
14781
|
+
#ifndef NDEBUG
|
14782
|
+
e->guaranteed_bytes = 0;
|
14783
|
+
#endif
|
14784
|
+
}
|
14785
|
+
|
14786
|
+
// Signals the maximum number that the operation about to be performed may
|
14787
|
+
// consume.
|
14788
|
+
UPB_INLINE void UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(
|
14789
|
+
upb_EpsCopyInputStream* e, int n) {
|
14790
|
+
#ifndef NDEBUG
|
14791
|
+
if (e) {
|
14792
|
+
UPB_ASSERT(e->guaranteed_bytes >= n);
|
14793
|
+
e->guaranteed_bytes -= n;
|
14794
|
+
}
|
14795
|
+
#endif
|
14796
|
+
}
|
14797
|
+
|
14690
14798
|
// Initializes a upb_EpsCopyInputStream using the contents of the buffer
|
14691
14799
|
// [*ptr, size]. Updates `*ptr` as necessary to guarantee that at least
|
14692
14800
|
// kUpb_EpsCopyInputStream_SlopBytes are available to read.
|
@@ -14709,6 +14817,7 @@ UPB_INLINE void upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e,
|
|
14709
14817
|
e->aliasing = enable_aliasing;
|
14710
14818
|
e->limit_ptr = e->end;
|
14711
14819
|
e->error = false;
|
14820
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(e);
|
14712
14821
|
}
|
14713
14822
|
|
14714
14823
|
typedef enum {
|
@@ -14729,10 +14838,13 @@ UPB_INLINE upb_IsDoneStatus upb_EpsCopyInputStream_IsDoneStatus(
|
|
14729
14838
|
upb_EpsCopyInputStream* e, const char* ptr, int* overrun) {
|
14730
14839
|
*overrun = ptr - e->end;
|
14731
14840
|
if (UPB_LIKELY(ptr < e->limit_ptr)) {
|
14841
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(e);
|
14732
14842
|
return kUpb_IsDoneStatus_NotDone;
|
14733
14843
|
} else if (UPB_LIKELY(*overrun == e->limit)) {
|
14844
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsHit)(e);
|
14734
14845
|
return kUpb_IsDoneStatus_Done;
|
14735
14846
|
} else {
|
14847
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsHit)(e);
|
14736
14848
|
return kUpb_IsDoneStatus_NeedFallback;
|
14737
14849
|
}
|
14738
14850
|
}
|
@@ -14750,11 +14862,18 @@ UPB_INLINE bool upb_EpsCopyInputStream_IsDoneWithCallback(
|
|
14750
14862
|
int overrun;
|
14751
14863
|
switch (upb_EpsCopyInputStream_IsDoneStatus(e, *ptr, &overrun)) {
|
14752
14864
|
case kUpb_IsDoneStatus_Done:
|
14865
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsHit)(e);
|
14753
14866
|
return true;
|
14754
14867
|
case kUpb_IsDoneStatus_NotDone:
|
14868
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(e);
|
14755
14869
|
return false;
|
14756
14870
|
case kUpb_IsDoneStatus_NeedFallback:
|
14757
14871
|
*ptr = func(e, *ptr, overrun);
|
14872
|
+
if (*ptr) {
|
14873
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(e);
|
14874
|
+
} else {
|
14875
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsHit)(e);
|
14876
|
+
}
|
14758
14877
|
return *ptr == NULL;
|
14759
14878
|
}
|
14760
14879
|
UPB_UNREACHABLE();
|
@@ -15001,7 +15120,11 @@ UPB_INLINE const char* _upb_EpsCopyInputStream_IsDoneFallbackInline(
|
|
15001
15120
|
e->limit_ptr = e->end + e->limit;
|
15002
15121
|
UPB_ASSERT(ptr < e->limit_ptr);
|
15003
15122
|
e->input_delta = (uintptr_t)old_end - (uintptr_t)new_start;
|
15004
|
-
|
15123
|
+
const char* ret = callback(e, old_end, new_start);
|
15124
|
+
if (ret) {
|
15125
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(e);
|
15126
|
+
}
|
15127
|
+
return ret;
|
15005
15128
|
} else {
|
15006
15129
|
UPB_ASSERT(overrun > e->limit);
|
15007
15130
|
e->error = true;
|
@@ -15056,6 +15179,10 @@ UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast(
|
|
15056
15179
|
#ifndef UPB_WIRE_INTERNAL_READER_H_
|
15057
15180
|
#define UPB_WIRE_INTERNAL_READER_H_
|
15058
15181
|
|
15182
|
+
#include <stddef.h>
|
15183
|
+
#include <stdint.h>
|
15184
|
+
|
15185
|
+
|
15059
15186
|
// Must be last.
|
15060
15187
|
|
15061
15188
|
#define kUpb_WireReader_WireTypeBits 3
|
@@ -15071,22 +15198,36 @@ extern "C" {
|
|
15071
15198
|
#endif
|
15072
15199
|
|
15073
15200
|
UPB_PRIVATE(_upb_WireReader_LongVarint)
|
15074
|
-
UPB_PRIVATE(
|
15201
|
+
UPB_PRIVATE(_upb_WireReader_ReadLongVarint32)(const char* ptr, uint32_t val);
|
15202
|
+
UPB_PRIVATE(_upb_WireReader_LongVarint)
|
15203
|
+
UPB_PRIVATE(_upb_WireReader_ReadLongVarint64)(const char* ptr, uint64_t val);
|
15075
15204
|
|
15076
15205
|
UPB_FORCEINLINE const char* UPB_PRIVATE(_upb_WireReader_ReadVarint)(
|
15077
|
-
const char* ptr, uint64_t* val,
|
15078
|
-
|
15206
|
+
const char* ptr, uint64_t* val, upb_EpsCopyInputStream* stream) {
|
15207
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(stream, 10);
|
15208
|
+
uint8_t byte = *ptr;
|
15079
15209
|
if (UPB_LIKELY((byte & 0x80) == 0)) {
|
15080
|
-
*val =
|
15210
|
+
*val = byte;
|
15081
15211
|
return ptr + 1;
|
15082
15212
|
}
|
15083
|
-
const char* start = ptr;
|
15084
15213
|
UPB_PRIVATE(_upb_WireReader_LongVarint)
|
15085
|
-
res = UPB_PRIVATE(
|
15086
|
-
if (!res.ptr
|
15087
|
-
|
15088
|
-
|
15214
|
+
res = UPB_PRIVATE(_upb_WireReader_ReadLongVarint64)(ptr, byte);
|
15215
|
+
if (UPB_UNLIKELY(!res.ptr)) return NULL;
|
15216
|
+
*val = res.val;
|
15217
|
+
return res.ptr;
|
15218
|
+
}
|
15219
|
+
|
15220
|
+
UPB_FORCEINLINE const char* UPB_PRIVATE(_upb_WireReader_ReadTag)(
|
15221
|
+
const char* ptr, uint32_t* val, upb_EpsCopyInputStream* stream) {
|
15222
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(stream, 5);
|
15223
|
+
uint8_t byte = *ptr;
|
15224
|
+
if (UPB_LIKELY((byte & 0x80) == 0)) {
|
15225
|
+
*val = byte;
|
15226
|
+
return ptr + 1;
|
15089
15227
|
}
|
15228
|
+
UPB_PRIVATE(_upb_WireReader_LongVarint)
|
15229
|
+
res = UPB_PRIVATE(_upb_WireReader_ReadLongVarint32)(ptr, byte);
|
15230
|
+
if (UPB_UNLIKELY(!res.ptr)) return NULL;
|
15090
15231
|
*val = res.val;
|
15091
15232
|
return res.ptr;
|
15092
15233
|
}
|
@@ -15139,13 +15280,9 @@ extern "C" {
|
|
15139
15280
|
// REQUIRES: there must be at least 10 bytes of data available at `ptr`.
|
15140
15281
|
// Bounds checks must be performed before calling this function, preferably
|
15141
15282
|
// by calling upb_EpsCopyInputStream_IsDone().
|
15142
|
-
UPB_FORCEINLINE const char* upb_WireReader_ReadTag(
|
15143
|
-
|
15144
|
-
|
15145
|
-
ptr = UPB_PRIVATE(_upb_WireReader_ReadVarint)(ptr, &val, 5, UINT32_MAX);
|
15146
|
-
if (!ptr) return NULL;
|
15147
|
-
*tag = val;
|
15148
|
-
return ptr;
|
15283
|
+
UPB_FORCEINLINE const char* upb_WireReader_ReadTag(
|
15284
|
+
const char* ptr, uint32_t* tag, upb_EpsCopyInputStream* stream) {
|
15285
|
+
return UPB_PRIVATE(_upb_WireReader_ReadTag)(ptr, tag, stream);
|
15149
15286
|
}
|
15150
15287
|
|
15151
15288
|
// Given a tag, returns the field number.
|
@@ -15154,9 +15291,9 @@ UPB_API_INLINE uint32_t upb_WireReader_GetFieldNumber(uint32_t tag);
|
|
15154
15291
|
// Given a tag, returns the wire type.
|
15155
15292
|
UPB_API_INLINE uint8_t upb_WireReader_GetWireType(uint32_t tag);
|
15156
15293
|
|
15157
|
-
UPB_INLINE const char* upb_WireReader_ReadVarint(
|
15158
|
-
|
15159
|
-
return UPB_PRIVATE(_upb_WireReader_ReadVarint)(ptr, val,
|
15294
|
+
UPB_INLINE const char* upb_WireReader_ReadVarint(
|
15295
|
+
const char* ptr, uint64_t* val, upb_EpsCopyInputStream* stream) {
|
15296
|
+
return UPB_PRIVATE(_upb_WireReader_ReadVarint)(ptr, val, stream);
|
15160
15297
|
}
|
15161
15298
|
|
15162
15299
|
// Skips data for a varint, returning a pointer past the end of the varint, or
|
@@ -15165,9 +15302,10 @@ UPB_INLINE const char* upb_WireReader_ReadVarint(const char* ptr,
|
|
15165
15302
|
// REQUIRES: there must be at least 10 bytes of data available at `ptr`.
|
15166
15303
|
// Bounds checks must be performed before calling this function, preferably
|
15167
15304
|
// by calling upb_EpsCopyInputStream_IsDone().
|
15168
|
-
UPB_INLINE const char* upb_WireReader_SkipVarint(
|
15305
|
+
UPB_INLINE const char* upb_WireReader_SkipVarint(
|
15306
|
+
const char* ptr, upb_EpsCopyInputStream* stream) {
|
15169
15307
|
uint64_t val;
|
15170
|
-
return upb_WireReader_ReadVarint(ptr, &val);
|
15308
|
+
return upb_WireReader_ReadVarint(ptr, &val, stream);
|
15171
15309
|
}
|
15172
15310
|
|
15173
15311
|
// Reads a varint indicating the size of a delimited field into `size`, or
|
@@ -15176,9 +15314,10 @@ UPB_INLINE const char* upb_WireReader_SkipVarint(const char* ptr) {
|
|
15176
15314
|
// REQUIRES: there must be at least 10 bytes of data available at `ptr`.
|
15177
15315
|
// Bounds checks must be performed before calling this function, preferably
|
15178
15316
|
// by calling upb_EpsCopyInputStream_IsDone().
|
15179
|
-
UPB_INLINE const char* upb_WireReader_ReadSize(const char* ptr, int* size
|
15317
|
+
UPB_INLINE const char* upb_WireReader_ReadSize(const char* ptr, int* size,
|
15318
|
+
upb_EpsCopyInputStream* stream) {
|
15180
15319
|
uint64_t size64;
|
15181
|
-
ptr = upb_WireReader_ReadVarint(ptr, &size64);
|
15320
|
+
ptr = upb_WireReader_ReadVarint(ptr, &size64, stream);
|
15182
15321
|
if (!ptr || size64 >= INT32_MAX) return NULL;
|
15183
15322
|
*size = size64;
|
15184
15323
|
return ptr;
|
@@ -15189,7 +15328,9 @@ UPB_INLINE const char* upb_WireReader_ReadSize(const char* ptr, int* size) {
|
|
15189
15328
|
// REQUIRES: there must be at least 4 bytes of data available at `ptr`.
|
15190
15329
|
// Bounds checks must be performed before calling this function, preferably
|
15191
15330
|
// by calling upb_EpsCopyInputStream_IsDone().
|
15192
|
-
UPB_INLINE const char* upb_WireReader_ReadFixed32(
|
15331
|
+
UPB_INLINE const char* upb_WireReader_ReadFixed32(
|
15332
|
+
const char* ptr, void* val, upb_EpsCopyInputStream* stream) {
|
15333
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(stream, 4);
|
15193
15334
|
uint32_t uval;
|
15194
15335
|
memcpy(&uval, ptr, 4);
|
15195
15336
|
uval = upb_BigEndian32(uval);
|
@@ -15202,7 +15343,9 @@ UPB_INLINE const char* upb_WireReader_ReadFixed32(const char* ptr, void* val) {
|
|
15202
15343
|
// REQUIRES: there must be at least 4 bytes of data available at `ptr`.
|
15203
15344
|
// Bounds checks must be performed before calling this function, preferably
|
15204
15345
|
// by calling upb_EpsCopyInputStream_IsDone().
|
15205
|
-
UPB_INLINE const char* upb_WireReader_ReadFixed64(
|
15346
|
+
UPB_INLINE const char* upb_WireReader_ReadFixed64(
|
15347
|
+
const char* ptr, void* val, upb_EpsCopyInputStream* stream) {
|
15348
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(stream, 8);
|
15206
15349
|
uint64_t uval;
|
15207
15350
|
memcpy(&uval, ptr, 8);
|
15208
15351
|
uval = upb_BigEndian64(uval);
|
@@ -15233,14 +15376,16 @@ UPB_INLINE const char* _upb_WireReader_SkipValue(
|
|
15233
15376
|
upb_EpsCopyInputStream* stream) {
|
15234
15377
|
switch (upb_WireReader_GetWireType(tag)) {
|
15235
15378
|
case kUpb_WireType_Varint:
|
15236
|
-
return upb_WireReader_SkipVarint(ptr);
|
15379
|
+
return upb_WireReader_SkipVarint(ptr, stream);
|
15237
15380
|
case kUpb_WireType_32Bit:
|
15381
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(stream, 4);
|
15238
15382
|
return ptr + 4;
|
15239
15383
|
case kUpb_WireType_64Bit:
|
15384
|
+
UPB_PRIVATE(upb_EpsCopyInputStream_ConsumeBytes)(stream, 8);
|
15240
15385
|
return ptr + 8;
|
15241
15386
|
case kUpb_WireType_Delimited: {
|
15242
15387
|
int size;
|
15243
|
-
ptr = upb_WireReader_ReadSize(ptr, &size);
|
15388
|
+
ptr = upb_WireReader_ReadSize(ptr, &size, stream);
|
15244
15389
|
if (!ptr || !upb_EpsCopyInputStream_CheckSize(stream, ptr, size)) {
|
15245
15390
|
return NULL;
|
15246
15391
|
}
|
@@ -16559,3 +16704,7 @@ UPB_PRIVATE(upb_WireWriter_VarintUnusedSizeFromLeadingZeros64)(uint64_t clz) {
|
|
16559
16704
|
#undef UPB_HAS_BUILTIN
|
16560
16705
|
#undef UPB_HAS_EXTENSION
|
16561
16706
|
#undef UPB_HAS_FEATURE
|
16707
|
+
#undef UPB_XSAN_MEMBER
|
16708
|
+
#undef UPB_XSAN
|
16709
|
+
#undef UPB_XSAN_STRUCT_SIZE
|
16710
|
+
#undef UPB_ENABLE_REF_CYCLE_CHECKS
|
@@ -5,7 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
|
8
|
-
descriptor_data = "\n google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"U\n\x11\x46ileDescriptorSet\x12\x32\n\x04\x66ile\x18\x01 \x03(\x0b\x32$.google.protobuf.FileDescriptorProto*\x0c\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\xa1\x04\n\x13\x46ileDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07package\x18\x02 \x01(\t\x12\x12\n\ndependency\x18\x03 \x03(\t\x12\x19\n\x11public_dependency\x18\n \x03(\x05\x12\x17\n\x0fweak_dependency\x18\x0b \x03(\x05\x12\x19\n\x11option_dependency\x18\x0f \x03(\t\x12\x36\n\x0cmessage_type\x18\x04 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x05 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12\x38\n\x07service\x18\x06 \x03(\x0b\x32\'.google.protobuf.ServiceDescriptorProto\x12\x38\n\textension\x18\x07 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12-\n\x07options\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.FileOptions\x12\x39\n\x10source_code_info\x18\t \x01(\x0b\x32\x1f.google.protobuf.SourceCodeInfo\x12\x0e\n\x06syntax\x18\x0c \x01(\t\x12)\n\x07\x65\x64ition\x18\x0e \x01(\x0e\x32\x18.google.protobuf.Edition\"\xe0\x05\n\x0f\x44\x65scriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x05\x66ield\x18\x02 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x38\n\textension\x18\x06 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x35\n\x0bnested_type\x18\x03 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x04 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12H\n\x0f\x65xtension_range\x18\x05 \x03(\x0b\x32/.google.protobuf.DescriptorProto.ExtensionRange\x12\x39\n\noneof_decl\x18\x08 \x03(\x0b\x32%.google.protobuf.OneofDescriptorProto\x12\x30\n\x07options\x18\x07 \x01(\x0b\x32\x1f.google.protobuf.MessageOptions\x12\x46\n\x0ereserved_range\x18\t \x03(\x0b\x32..google.protobuf.DescriptorProto.ReservedRange\x12\x15\n\rreserved_name\x18\n \x03(\t\x12\x35\n\nvisibility\x18\x0b \x01(\x0e\x32!.google.protobuf.SymbolVisibility\x1a\x65\n\x0e\x45xtensionRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12\x37\n\x07options\x18\x03 \x01(\x0b\x32&.google.protobuf.ExtensionRangeOptions\x1a+\n\rReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"\xe5\x03\n\x15\x45xtensionRangeOptions\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\x12L\n\x0b\x64\x65\x63laration\x18\x02 \x03(\x0b\x32\x32.google.protobuf.ExtensionRangeOptions.DeclarationB\x03\x88\x01\x02\x12-\n\x08\x66\x65\x61tures\x18\x32 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12_\n\x0cverification\x18\x03 \x01(\x0e\x32\x38.google.protobuf.ExtensionRangeOptions.VerificationState:\nUNVERIFIEDB\x03\x88\x01\x02\x1ah\n\x0b\x44\x65\x63laration\x12\x0e\n\x06number\x18\x01 \x01(\x05\x12\x11\n\tfull_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x10\n\x08reserved\x18\x05 \x01(\x08\x12\x10\n\x08repeated\x18\x06 \x01(\x08J\x04\x08\x04\x10\x05\"4\n\x11VerificationState\x12\x0f\n\x0b\x44\x45\x43LARATION\x10\x00\x12\x0e\n\nUNVERIFIED\x10\x01*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xd5\x05\n\x14\x46ieldDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x03 \x01(\x05\x12:\n\x05label\x18\x04 \x01(\x0e\x32+.google.protobuf.FieldDescriptorProto.Label\x12\x38\n\x04type\x18\x05 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x11\n\ttype_name\x18\x06 \x01(\t\x12\x10\n\x08\x65xtendee\x18\x02 \x01(\t\x12\x15\n\rdefault_value\x18\x07 \x01(\t\x12\x13\n\x0boneof_index\x18\t \x01(\x05\x12\x11\n\tjson_name\x18\n \x01(\t\x12.\n\x07options\x18\x08 \x01(\x0b\x32\x1d.google.protobuf.FieldOptions\x12\x17\n\x0fproto3_optional\x18\x11 \x01(\x08\"\xb6\x02\n\x04Type\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12\"C\n\x05Label\x12\x12\n\x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REPEATED\x10\x03\x12\x12\n\x0eLABEL_REQUIRED\x10\x02\"T\n\x14OneofDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\x07options\x18\x02 \x01(\x0b\x32\x1d.google.protobuf.OneofOptions\"\xdb\x02\n\x13\x45numDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x03(\x0b\x32).google.protobuf.EnumValueDescriptorProto\x12-\n\x07options\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.EnumOptions\x12N\n\x0ereserved_range\x18\x04 \x03(\x0b\x32\x36.google.protobuf.EnumDescriptorProto.EnumReservedRange\x12\x15\n\rreserved_name\x18\x05 \x03(\t\x12\x35\n\nvisibility\x18\x06 \x01(\x0e\x32!.google.protobuf.SymbolVisibility\x1a/\n\x11\x45numReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"l\n\x18\x45numValueDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x02 \x01(\x05\x12\x32\n\x07options\x18\x03 \x01(\x0b\x32!.google.protobuf.EnumValueOptions\"\x90\x01\n\x16ServiceDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x06method\x18\x02 \x03(\x0b\x32&.google.protobuf.MethodDescriptorProto\x12\x30\n\x07options\x18\x03 \x01(\x0b\x32\x1f.google.protobuf.ServiceOptions\"\xc1\x01\n\x15MethodDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ninput_type\x18\x02 \x01(\t\x12\x13\n\x0boutput_type\x18\x03 \x01(\t\x12/\n\x07options\x18\x04 \x01(\x0b\x32\x1e.google.protobuf.MethodOptions\x12\x1f\n\x10\x63lient_streaming\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1f\n\x10server_streaming\x18\x06 \x01(\x08:\x05\x66\x61lse\"\xcb\x06\n\x0b\x46ileOptions\x12\x14\n\x0cjava_package\x18\x01 \x01(\t\x12\x1c\n\x14java_outer_classname\x18\x08 \x01(\t\x12\"\n\x13java_multiple_files\x18\n \x01(\x08:\x05\x66\x61lse\x12)\n\x1djava_generate_equals_and_hash\x18\x14 \x01(\x08\x42\x02\x18\x01\x12%\n\x16java_string_check_utf8\x18\x1b \x01(\x08:\x05\x66\x61lse\x12\x46\n\x0coptimize_for\x18\t \x01(\x0e\x32).google.protobuf.FileOptions.OptimizeMode:\x05SPEED\x12\x12\n\ngo_package\x18\x0b \x01(\t\x12\"\n\x13\x63\x63_generic_services\x18\x10 \x01(\x08:\x05\x66\x61lse\x12$\n\x15java_generic_services\x18\x11 \x01(\x08:\x05\x66\x61lse\x12\"\n\x13py_generic_services\x18\x12 \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x10\x63\x63_enable_arenas\x18\x1f \x01(\x08:\x04true\x12\x19\n\x11objc_class_prefix\x18$ \x01(\t\x12\x18\n\x10\x63sharp_namespace\x18% \x01(\t\x12\x14\n\x0cswift_prefix\x18\' \x01(\t\x12\x18\n\x10php_class_prefix\x18( \x01(\t\x12\x15\n\rphp_namespace\x18) \x01(\t\x12\x1e\n\x16php_metadata_namespace\x18, \x01(\t\x12\x14\n\x0cruby_package\x18- \x01(\t\x12-\n\x08\x66\x65\x61tures\x18\x32 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\":\n\x0cOptimizeMode\x12\t\n\x05SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\x0cLITE_RUNTIME\x10\x03*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08*\x10+J\x04\x08&\x10\'R\x14php_generic_services\"\xe7\x02\n\x0eMessageOptions\x12&\n\x17message_set_wire_format\x18\x01 \x01(\x08:\x05\x66\x61lse\x12.\n\x1fno_standard_descriptor_accessor\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x11\n\tmap_entry\x18\x07 \x01(\x08\x12\x32\n&deprecated_legacy_json_field_conflicts\x18\x0b \x01(\x08\x42\x02\x18\x01\x12-\n\x08\x66\x65\x61tures\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"\xa7\x0b\n\x0c\x46ieldOptions\x12:\n\x05\x63type\x18\x01 \x01(\x0e\x32#.google.protobuf.FieldOptions.CType:\x06STRING\x12\x0e\n\x06packed\x18\x02 \x01(\x08\x12?\n\x06jstype\x18\x06 \x01(\x0e\x32$.google.protobuf.FieldOptions.JSType:\tJS_NORMAL\x12\x13\n\x04lazy\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0funverified_lazy\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x17\n\x04weak\x18\n \x01(\x08:\x05\x66\x61lseB\x02\x18\x01\x12\x1b\n\x0c\x64\x65\x62ug_redact\x18\x10 \x01(\x08:\x05\x66\x61lse\x12@\n\tretention\x18\x11 \x01(\x0e\x32-.google.protobuf.FieldOptions.OptionRetention\x12?\n\x07targets\x18\x13 \x03(\x0e\x32..google.protobuf.FieldOptions.OptionTargetType\x12\x46\n\x10\x65\x64ition_defaults\x18\x14 \x03(\x0b\x32,.google.protobuf.FieldOptions.EditionDefault\x12-\n\x08\x66\x65\x61tures\x18\x15 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x45\n\x0f\x66\x65\x61ture_support\x18\x16 \x01(\x0b\x32,.google.protobuf.FieldOptions.FeatureSupport\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\x1aJ\n\x0e\x45\x64itionDefault\x12)\n\x07\x65\x64ition\x18\x03 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\r\n\x05value\x18\x02 \x01(\t\x1a\xcc\x01\n\x0e\x46\x65\x61tureSupport\x12\x34\n\x12\x65\x64ition_introduced\x18\x01 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x34\n\x12\x65\x64ition_deprecated\x18\x02 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x1b\n\x13\x64\x65precation_warning\x18\x03 \x01(\t\x12\x31\n\x0f\x65\x64ition_removed\x18\x04 \x01(\x0e\x32\x18.google.protobuf.Edition\"/\n\x05\x43Type\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x43ORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02\"5\n\x06JSType\x12\r\n\tJS_NORMAL\x10\x00\x12\r\n\tJS_STRING\x10\x01\x12\r\n\tJS_NUMBER\x10\x02\"U\n\x0fOptionRetention\x12\x15\n\x11RETENTION_UNKNOWN\x10\x00\x12\x15\n\x11RETENTION_RUNTIME\x10\x01\x12\x14\n\x10RETENTION_SOURCE\x10\x02\"\x8c\x02\n\x10OptionTargetType\x12\x17\n\x13TARGET_TYPE_UNKNOWN\x10\x00\x12\x14\n\x10TARGET_TYPE_FILE\x10\x01\x12\x1f\n\x1bTARGET_TYPE_EXTENSION_RANGE\x10\x02\x12\x17\n\x13TARGET_TYPE_MESSAGE\x10\x03\x12\x15\n\x11TARGET_TYPE_FIELD\x10\x04\x12\x15\n\x11TARGET_TYPE_ONEOF\x10\x05\x12\x14\n\x10TARGET_TYPE_ENUM\x10\x06\x12\x1a\n\x16TARGET_TYPE_ENUM_ENTRY\x10\x07\x12\x17\n\x13TARGET_TYPE_SERVICE\x10\x08\x12\x16\n\x12TARGET_TYPE_METHOD\x10\t*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x12\x10\x13\"\x8d\x01\n\x0cOneofOptions\x12-\n\x08\x66\x65\x61tures\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xf6\x01\n\x0b\x45numOptions\x12\x13\n\x0b\x61llow_alias\x18\x02 \x01(\x08\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x32\n&deprecated_legacy_json_field_conflicts\x18\x06 \x01(\x08\x42\x02\x18\x01\x12-\n\x08\x66\x65\x61tures\x18\x07 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x05\x10\x06\"\x90\x02\n\x10\x45numValueOptions\x12\x19\n\ndeprecated\x18\x01 \x01(\x08:\x05\x66\x61lse\x12-\n\x08\x66\x65\x61tures\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x1b\n\x0c\x64\x65\x62ug_redact\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x45\n\x0f\x66\x65\x61ture_support\x18\x04 \x01(\x0b\x32,.google.protobuf.FieldOptions.FeatureSupport\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xaa\x01\n\x0eServiceOptions\x12-\n\x08\x66\x65\x61tures\x18\" \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xdc\x02\n\rMethodOptions\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12_\n\x11idempotency_level\x18\" \x01(\x0e\x32/.google.protobuf.MethodOptions.IdempotencyLevel:\x13IDEMPOTENCY_UNKNOWN\x12-\n\x08\x66\x65\x61tures\x18# \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\"P\n\x10IdempotencyLevel\x12\x17\n\x13IDEMPOTENCY_UNKNOWN\x10\x00\x12\x13\n\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n\nIDEMPOTENT\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9e\x02\n\x13UninterpretedOption\x12;\n\x04name\x18\x02 \x03(\x0b\x32-.google.protobuf.UninterpretedOption.NamePart\x12\x18\n\x10identifier_value\x18\x03 \x01(\t\x12\x1a\n\x12positive_int_value\x18\x04 \x01(\x04\x12\x1a\n\x12negative_int_value\x18\x05 \x01(\x03\x12\x14\n\x0c\x64ouble_value\x18\x06 \x01(\x01\x12\x14\n\x0cstring_value\x18\x07 \x01(\x0c\x12\x17\n\x0f\x61ggregate_value\x18\x08 \x01(\t\x1a\x33\n\x08NamePart\x12\x11\n\tname_part\x18\x01 \x02(\t\x12\x14\n\x0cis_extension\x18\x02 \x02(\x08\"\x83\x0e\n\nFeatureSet\x12\x82\x01\n\x0e\x66ield_presence\x18\x01 \x01(\x0e\x32).google.protobuf.FeatureSet.FieldPresenceB?\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08\x45XPLICIT\x18\x84\x07\xa2\x01\r\x12\x08IMPLICIT\x18\xe7\x07\xa2\x01\r\x12\x08\x45XPLICIT\x18\xe8\x07\xb2\x01\x03\x08\xe8\x07\x12\x62\n\tenum_type\x18\x02 \x01(\x0e\x32$.google.protobuf.FeatureSet.EnumTypeB)\x88\x01\x01\x98\x01\x06\x98\x01\x01\xa2\x01\x0b\x12\x06\x43LOSED\x18\x84\x07\xa2\x01\t\x12\x04OPEN\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12\x81\x01\n\x17repeated_field_encoding\x18\x03 \x01(\x0e\x32\x31.google.protobuf.FeatureSet.RepeatedFieldEncodingB-\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08\x45XPANDED\x18\x84\x07\xa2\x01\x0b\x12\x06PACKED\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12n\n\x0futf8_validation\x18\x04 \x01(\x0e\x32*.google.protobuf.FeatureSet.Utf8ValidationB)\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\t\x12\x04NONE\x18\x84\x07\xa2\x01\x0b\x12\x06VERIFY\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12m\n\x10message_encoding\x18\x05 \x01(\x0e\x32+.google.protobuf.FeatureSet.MessageEncodingB&\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\x14\x12\x0fLENGTH_PREFIXED\x18\x84\x07\xb2\x01\x03\x08\xe8\x07\x12v\n\x0bjson_format\x18\x06 \x01(\x0e\x32&.google.protobuf.FeatureSet.JsonFormatB9\x88\x01\x01\x98\x01\x03\x98\x01\x06\x98\x01\x01\xa2\x01\x17\x12\x12LEGACY_BEST_EFFORT\x18\x84\x07\xa2\x01\n\x12\x05\x41LLOW\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12\x97\x01\n\x14\x65nforce_naming_style\x18\x07 \x01(\x0e\x32..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\x07\x98\x01\x08\x98\x01\t\xa2\x01\x11\x12\x0cSTYLE_LEGACY\x18\x84\x07\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\x07\xb2\x01\x03\x08\xe9\x07\x12\xa0\x01\n\x19\x64\x65\x66\x61ult_symbol_visibility\x18\x08 \x01(\x0e\x32\x45.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibilityB6\x88\x01\x02\x98\x01\x01\xa2\x01\x0f\x12\nEXPORT_ALL\x18\x84\x07\xa2\x01\x15\x12\x10\x45XPORT_TOP_LEVEL\x18\xe9\x07\xb2\x01\x03\x08\xe9\x07\x1a\xa1\x01\n\x11VisibilityFeature\"\x81\x01\n\x17\x44\x65\x66\x61ultSymbolVisibility\x12%\n!DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\x10\x00\x12\x0e\n\nEXPORT_ALL\x10\x01\x12\x14\n\x10\x45XPORT_TOP_LEVEL\x10\x02\x12\r\n\tLOCAL_ALL\x10\x03\x12\n\n\x06STRICT\x10\x04J\x08\x08\x01\x10\x80\x80\x80\x80\x02\"\\\n\rFieldPresence\x12\x1a\n\x16\x46IELD_PRESENCE_UNKNOWN\x10\x00\x12\x0c\n\x08\x45XPLICIT\x10\x01\x12\x0c\n\x08IMPLICIT\x10\x02\x12\x13\n\x0fLEGACY_REQUIRED\x10\x03\"7\n\x08\x45numType\x12\x15\n\x11\x45NUM_TYPE_UNKNOWN\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\"V\n\x15RepeatedFieldEncoding\x12#\n\x1fREPEATED_FIELD_ENCODING_UNKNOWN\x10\x00\x12\n\n\x06PACKED\x10\x01\x12\x0c\n\x08\x45XPANDED\x10\x02\"I\n\x0eUtf8Validation\x12\x1b\n\x17UTF8_VALIDATION_UNKNOWN\x10\x00\x12\n\n\x06VERIFY\x10\x02\x12\x08\n\x04NONE\x10\x03\"\x04\x08\x01\x10\x01\"S\n\x0fMessageEncoding\x12\x1c\n\x18MESSAGE_ENCODING_UNKNOWN\x10\x00\x12\x13\n\x0fLENGTH_PREFIXED\x10\x01\x12\r\n\tDELIMITED\x10\x02\"H\n\nJsonFormat\x12\x17\n\x13JSON_FORMAT_UNKNOWN\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x16\n\x12LEGACY_BEST_EFFORT\x10\x02\"W\n\x12\x45nforceNamingStyle\x12 \n\x1c\x45NFORCE_NAMING_STYLE_UNKNOWN\x10\x00\x12\r\n\tSTYLE2024\x10\x01\x12\x10\n\x0cSTYLE_LEGACY\x10\x02*\x06\x08\xe8\x07\x10\x8bN*\x06\x08\x8bN\x10\x90N*\x06\x08\x90N\x10\x91NJ\x06\x08\xe7\x07\x10\xe8\x07\"\x98\x03\n\x12\x46\x65\x61tureSetDefaults\x12N\n\x08\x64\x65\x66\x61ults\x18\x01 \x03(\x0b\x32<.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault\x12\x31\n\x0fminimum_edition\x18\x04 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x31\n\x0fmaximum_edition\x18\x05 \x01(\x0e\x32\x18.google.protobuf.Edition\x1a\xcb\x01\n\x18\x46\x65\x61tureSetEditionDefault\x12)\n\x07\x65\x64ition\x18\x03 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x39\n\x14overridable_features\x18\x04 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x33\n\x0e\x66ixed_features\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.FeatureSetJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x08\x66\x65\x61tures\"\xe3\x01\n\x0eSourceCodeInfo\x12:\n\x08location\x18\x01 \x03(\x0b\x32(.google.protobuf.SourceCodeInfo.Location\x1a\x86\x01\n\x08Location\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x10\n\x04span\x18\x02 \x03(\x05\x42\x02\x10\x01\x12\x18\n\x10leading_comments\x18\x03 \x01(\t\x12\x19\n\x11trailing_comments\x18\x04 \x01(\t\x12!\n\x19leading_detached_comments\x18\x06 \x03(\t*\x0c\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\x9c\x02\n\x11GeneratedCodeInfo\x12\x41\n\nannotation\x18\x01 \x03(\x0b\x32-.google.protobuf.GeneratedCodeInfo.Annotation\x1a\xc3\x01\n\nAnnotation\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x13\n\x0bsource_file\x18\x02 \x01(\t\x12\r\n\x05\x62\x65gin\x18\x03 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x05\x12H\n\x08semantic\x18\x05 \x01(\x0e\x32\x36.google.protobuf.GeneratedCodeInfo.Annotation.Semantic\"(\n\x08Semantic\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03SET\x10\x01\x12\t\n\x05\x41LIAS\x10\x02*\xa7\x02\n\x07\x45\x64ition\x12\x13\n\x0f\x45\x44ITION_UNKNOWN\x10\x00\x12\x13\n\x0e\x45\x44ITION_LEGACY\x10\x84\x07\x12\x13\n\x0e\x45\x44ITION_PROTO2\x10\xe6\x07\x12\x13\n\x0e\x45\x44ITION_PROTO3\x10\xe7\x07\x12\x11\n\x0c\x45\x44ITION_2023\x10\xe8\x07\x12\x11\n\x0c\x45\x44ITION_2024\x10\xe9\x07\x12\x17\n\x13\x45\x44ITION_1_TEST_ONLY\x10\x01\x12\x17\n\x13\x45\x44ITION_2_TEST_ONLY\x10\x02\x12\x1d\n\x17\x45\x44ITION_99997_TEST_ONLY\x10\x9d\x8d\x06\x12\x1d\n\x17\x45\x44ITION_99998_TEST_ONLY\x10\x9e\x8d\x06\x12\x1d\n\x17\x45\x44ITION_99999_TEST_ONLY\x10\x9f\x8d\x06\x12\x13\n\x0b\x45\x44ITION_MAX\x10\xff\xff\xff\xff\x07*U\n\x10SymbolVisibility\x12\x14\n\x10VISIBILITY_UNSET\x10\x00\x12\x14\n\x10VISIBILITY_LOCAL\x10\x01\x12\x15\n\x11VISIBILITY_EXPORT\x10\x02\x42~\n\x13\x63om.google.protobufB\x10\x44\x65scriptorProtosH\x01Z-google.golang.org/protobuf/types/descriptorpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.Reflection"
|
8
|
+
descriptor_data = "\n google/protobuf/descriptor.proto\x12\x0fgoogle.protobuf\"U\n\x11\x46ileDescriptorSet\x12\x32\n\x04\x66ile\x18\x01 \x03(\x0b\x32$.google.protobuf.FileDescriptorProto*\x0c\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\xa1\x04\n\x13\x46ileDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07package\x18\x02 \x01(\t\x12\x12\n\ndependency\x18\x03 \x03(\t\x12\x19\n\x11public_dependency\x18\n \x03(\x05\x12\x17\n\x0fweak_dependency\x18\x0b \x03(\x05\x12\x19\n\x11option_dependency\x18\x0f \x03(\t\x12\x36\n\x0cmessage_type\x18\x04 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x05 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12\x38\n\x07service\x18\x06 \x03(\x0b\x32\'.google.protobuf.ServiceDescriptorProto\x12\x38\n\textension\x18\x07 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12-\n\x07options\x18\x08 \x01(\x0b\x32\x1c.google.protobuf.FileOptions\x12\x39\n\x10source_code_info\x18\t \x01(\x0b\x32\x1f.google.protobuf.SourceCodeInfo\x12\x0e\n\x06syntax\x18\x0c \x01(\t\x12)\n\x07\x65\x64ition\x18\x0e \x01(\x0e\x32\x18.google.protobuf.Edition\"\xe0\x05\n\x0f\x44\x65scriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x05\x66ield\x18\x02 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x38\n\textension\x18\x06 \x03(\x0b\x32%.google.protobuf.FieldDescriptorProto\x12\x35\n\x0bnested_type\x18\x03 \x03(\x0b\x32 .google.protobuf.DescriptorProto\x12\x37\n\tenum_type\x18\x04 \x03(\x0b\x32$.google.protobuf.EnumDescriptorProto\x12H\n\x0f\x65xtension_range\x18\x05 \x03(\x0b\x32/.google.protobuf.DescriptorProto.ExtensionRange\x12\x39\n\noneof_decl\x18\x08 \x03(\x0b\x32%.google.protobuf.OneofDescriptorProto\x12\x30\n\x07options\x18\x07 \x01(\x0b\x32\x1f.google.protobuf.MessageOptions\x12\x46\n\x0ereserved_range\x18\t \x03(\x0b\x32..google.protobuf.DescriptorProto.ReservedRange\x12\x15\n\rreserved_name\x18\n \x03(\t\x12\x35\n\nvisibility\x18\x0b \x01(\x0e\x32!.google.protobuf.SymbolVisibility\x1a\x65\n\x0e\x45xtensionRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\x12\x37\n\x07options\x18\x03 \x01(\x0b\x32&.google.protobuf.ExtensionRangeOptions\x1a+\n\rReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"\xe5\x03\n\x15\x45xtensionRangeOptions\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\x12L\n\x0b\x64\x65\x63laration\x18\x02 \x03(\x0b\x32\x32.google.protobuf.ExtensionRangeOptions.DeclarationB\x03\x88\x01\x02\x12-\n\x08\x66\x65\x61tures\x18\x32 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12_\n\x0cverification\x18\x03 \x01(\x0e\x32\x38.google.protobuf.ExtensionRangeOptions.VerificationState:\nUNVERIFIEDB\x03\x88\x01\x02\x1ah\n\x0b\x44\x65\x63laration\x12\x0e\n\x06number\x18\x01 \x01(\x05\x12\x11\n\tfull_name\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\x12\x10\n\x08reserved\x18\x05 \x01(\x08\x12\x10\n\x08repeated\x18\x06 \x01(\x08J\x04\x08\x04\x10\x05\"4\n\x11VerificationState\x12\x0f\n\x0b\x44\x45\x43LARATION\x10\x00\x12\x0e\n\nUNVERIFIED\x10\x01*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xd5\x05\n\x14\x46ieldDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x03 \x01(\x05\x12:\n\x05label\x18\x04 \x01(\x0e\x32+.google.protobuf.FieldDescriptorProto.Label\x12\x38\n\x04type\x18\x05 \x01(\x0e\x32*.google.protobuf.FieldDescriptorProto.Type\x12\x11\n\ttype_name\x18\x06 \x01(\t\x12\x10\n\x08\x65xtendee\x18\x02 \x01(\t\x12\x15\n\rdefault_value\x18\x07 \x01(\t\x12\x13\n\x0boneof_index\x18\t \x01(\x05\x12\x11\n\tjson_name\x18\n \x01(\t\x12.\n\x07options\x18\x08 \x01(\x0b\x32\x1d.google.protobuf.FieldOptions\x12\x17\n\x0fproto3_optional\x18\x11 \x01(\x08\"\xb6\x02\n\x04Type\x12\x0f\n\x0bTYPE_DOUBLE\x10\x01\x12\x0e\n\nTYPE_FLOAT\x10\x02\x12\x0e\n\nTYPE_INT64\x10\x03\x12\x0f\n\x0bTYPE_UINT64\x10\x04\x12\x0e\n\nTYPE_INT32\x10\x05\x12\x10\n\x0cTYPE_FIXED64\x10\x06\x12\x10\n\x0cTYPE_FIXED32\x10\x07\x12\r\n\tTYPE_BOOL\x10\x08\x12\x0f\n\x0bTYPE_STRING\x10\t\x12\x0e\n\nTYPE_GROUP\x10\n\x12\x10\n\x0cTYPE_MESSAGE\x10\x0b\x12\x0e\n\nTYPE_BYTES\x10\x0c\x12\x0f\n\x0bTYPE_UINT32\x10\r\x12\r\n\tTYPE_ENUM\x10\x0e\x12\x11\n\rTYPE_SFIXED32\x10\x0f\x12\x11\n\rTYPE_SFIXED64\x10\x10\x12\x0f\n\x0bTYPE_SINT32\x10\x11\x12\x0f\n\x0bTYPE_SINT64\x10\x12\"C\n\x05Label\x12\x12\n\x0eLABEL_OPTIONAL\x10\x01\x12\x12\n\x0eLABEL_REPEATED\x10\x03\x12\x12\n\x0eLABEL_REQUIRED\x10\x02\"T\n\x14OneofDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\x07options\x18\x02 \x01(\x0b\x32\x1d.google.protobuf.OneofOptions\"\xdb\x02\n\x13\x45numDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x03(\x0b\x32).google.protobuf.EnumValueDescriptorProto\x12-\n\x07options\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.EnumOptions\x12N\n\x0ereserved_range\x18\x04 \x03(\x0b\x32\x36.google.protobuf.EnumDescriptorProto.EnumReservedRange\x12\x15\n\rreserved_name\x18\x05 \x03(\t\x12\x35\n\nvisibility\x18\x06 \x01(\x0e\x32!.google.protobuf.SymbolVisibility\x1a/\n\x11\x45numReservedRange\x12\r\n\x05start\x18\x01 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x02 \x01(\x05\"l\n\x18\x45numValueDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x02 \x01(\x05\x12\x32\n\x07options\x18\x03 \x01(\x0b\x32!.google.protobuf.EnumValueOptions\"\x9e\x01\n\x16ServiceDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x36\n\x06method\x18\x02 \x03(\x0b\x32&.google.protobuf.MethodDescriptorProto\x12\x30\n\x07options\x18\x03 \x01(\x0b\x32\x1f.google.protobuf.ServiceOptionsJ\x04\x08\x04\x10\x05R\x06stream\"\xc1\x01\n\x15MethodDescriptorProto\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ninput_type\x18\x02 \x01(\t\x12\x13\n\x0boutput_type\x18\x03 \x01(\t\x12/\n\x07options\x18\x04 \x01(\x0b\x32\x1e.google.protobuf.MethodOptions\x12\x1f\n\x10\x63lient_streaming\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1f\n\x10server_streaming\x18\x06 \x01(\x08:\x05\x66\x61lse\"\xcb\x06\n\x0b\x46ileOptions\x12\x14\n\x0cjava_package\x18\x01 \x01(\t\x12\x1c\n\x14java_outer_classname\x18\x08 \x01(\t\x12\"\n\x13java_multiple_files\x18\n \x01(\x08:\x05\x66\x61lse\x12)\n\x1djava_generate_equals_and_hash\x18\x14 \x01(\x08\x42\x02\x18\x01\x12%\n\x16java_string_check_utf8\x18\x1b \x01(\x08:\x05\x66\x61lse\x12\x46\n\x0coptimize_for\x18\t \x01(\x0e\x32).google.protobuf.FileOptions.OptimizeMode:\x05SPEED\x12\x12\n\ngo_package\x18\x0b \x01(\t\x12\"\n\x13\x63\x63_generic_services\x18\x10 \x01(\x08:\x05\x66\x61lse\x12$\n\x15java_generic_services\x18\x11 \x01(\x08:\x05\x66\x61lse\x12\"\n\x13py_generic_services\x18\x12 \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x17 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x10\x63\x63_enable_arenas\x18\x1f \x01(\x08:\x04true\x12\x19\n\x11objc_class_prefix\x18$ \x01(\t\x12\x18\n\x10\x63sharp_namespace\x18% \x01(\t\x12\x14\n\x0cswift_prefix\x18\' \x01(\t\x12\x18\n\x10php_class_prefix\x18( \x01(\t\x12\x15\n\rphp_namespace\x18) \x01(\t\x12\x1e\n\x16php_metadata_namespace\x18, \x01(\t\x12\x14\n\x0cruby_package\x18- \x01(\t\x12-\n\x08\x66\x65\x61tures\x18\x32 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\":\n\x0cOptimizeMode\x12\t\n\x05SPEED\x10\x01\x12\r\n\tCODE_SIZE\x10\x02\x12\x10\n\x0cLITE_RUNTIME\x10\x03*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08*\x10+J\x04\x08&\x10\'R\x14php_generic_services\"\xe7\x02\n\x0eMessageOptions\x12&\n\x17message_set_wire_format\x18\x01 \x01(\x08:\x05\x66\x61lse\x12.\n\x1fno_standard_descriptor_accessor\x18\x02 \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x11\n\tmap_entry\x18\x07 \x01(\x08\x12\x32\n&deprecated_legacy_json_field_conflicts\x18\x0b \x01(\x08\x42\x02\x18\x01\x12-\n\x08\x66\x65\x61tures\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"\xa7\x0b\n\x0c\x46ieldOptions\x12:\n\x05\x63type\x18\x01 \x01(\x0e\x32#.google.protobuf.FieldOptions.CType:\x06STRING\x12\x0e\n\x06packed\x18\x02 \x01(\x08\x12?\n\x06jstype\x18\x06 \x01(\x0e\x32$.google.protobuf.FieldOptions.JSType:\tJS_NORMAL\x12\x13\n\x04lazy\x18\x05 \x01(\x08:\x05\x66\x61lse\x12\x1e\n\x0funverified_lazy\x18\x0f \x01(\x08:\x05\x66\x61lse\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x17\n\x04weak\x18\n \x01(\x08:\x05\x66\x61lseB\x02\x18\x01\x12\x1b\n\x0c\x64\x65\x62ug_redact\x18\x10 \x01(\x08:\x05\x66\x61lse\x12@\n\tretention\x18\x11 \x01(\x0e\x32-.google.protobuf.FieldOptions.OptionRetention\x12?\n\x07targets\x18\x13 \x03(\x0e\x32..google.protobuf.FieldOptions.OptionTargetType\x12\x46\n\x10\x65\x64ition_defaults\x18\x14 \x03(\x0b\x32,.google.protobuf.FieldOptions.EditionDefault\x12-\n\x08\x66\x65\x61tures\x18\x15 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x45\n\x0f\x66\x65\x61ture_support\x18\x16 \x01(\x0b\x32,.google.protobuf.FieldOptions.FeatureSupport\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\x1aJ\n\x0e\x45\x64itionDefault\x12)\n\x07\x65\x64ition\x18\x03 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\r\n\x05value\x18\x02 \x01(\t\x1a\xcc\x01\n\x0e\x46\x65\x61tureSupport\x12\x34\n\x12\x65\x64ition_introduced\x18\x01 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x34\n\x12\x65\x64ition_deprecated\x18\x02 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x1b\n\x13\x64\x65precation_warning\x18\x03 \x01(\t\x12\x31\n\x0f\x65\x64ition_removed\x18\x04 \x01(\x0e\x32\x18.google.protobuf.Edition\"/\n\x05\x43Type\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x43ORD\x10\x01\x12\x10\n\x0cSTRING_PIECE\x10\x02\"5\n\x06JSType\x12\r\n\tJS_NORMAL\x10\x00\x12\r\n\tJS_STRING\x10\x01\x12\r\n\tJS_NUMBER\x10\x02\"U\n\x0fOptionRetention\x12\x15\n\x11RETENTION_UNKNOWN\x10\x00\x12\x15\n\x11RETENTION_RUNTIME\x10\x01\x12\x14\n\x10RETENTION_SOURCE\x10\x02\"\x8c\x02\n\x10OptionTargetType\x12\x17\n\x13TARGET_TYPE_UNKNOWN\x10\x00\x12\x14\n\x10TARGET_TYPE_FILE\x10\x01\x12\x1f\n\x1bTARGET_TYPE_EXTENSION_RANGE\x10\x02\x12\x17\n\x13TARGET_TYPE_MESSAGE\x10\x03\x12\x15\n\x11TARGET_TYPE_FIELD\x10\x04\x12\x15\n\x11TARGET_TYPE_ONEOF\x10\x05\x12\x14\n\x10TARGET_TYPE_ENUM\x10\x06\x12\x1a\n\x16TARGET_TYPE_ENUM_ENTRY\x10\x07\x12\x17\n\x13TARGET_TYPE_SERVICE\x10\x08\x12\x16\n\x12TARGET_TYPE_METHOD\x10\t*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x04\x10\x05J\x04\x08\x12\x10\x13\"\x8d\x01\n\x0cOneofOptions\x12-\n\x08\x66\x65\x61tures\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xf6\x01\n\x0b\x45numOptions\x12\x13\n\x0b\x61llow_alias\x18\x02 \x01(\x08\x12\x19\n\ndeprecated\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x32\n&deprecated_legacy_json_field_conflicts\x18\x06 \x01(\x08\x42\x02\x18\x01\x12-\n\x08\x66\x65\x61tures\x18\x07 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02J\x04\x08\x05\x10\x06\"\x90\x02\n\x10\x45numValueOptions\x12\x19\n\ndeprecated\x18\x01 \x01(\x08:\x05\x66\x61lse\x12-\n\x08\x66\x65\x61tures\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x1b\n\x0c\x64\x65\x62ug_redact\x18\x03 \x01(\x08:\x05\x66\x61lse\x12\x45\n\x0f\x66\x65\x61ture_support\x18\x04 \x01(\x0b\x32,.google.protobuf.FieldOptions.FeatureSupport\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xaa\x01\n\x0eServiceOptions\x12-\n\x08\x66\x65\x61tures\x18\" \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\xdc\x02\n\rMethodOptions\x12\x19\n\ndeprecated\x18! \x01(\x08:\x05\x66\x61lse\x12_\n\x11idempotency_level\x18\" \x01(\x0e\x32/.google.protobuf.MethodOptions.IdempotencyLevel:\x13IDEMPOTENCY_UNKNOWN\x12-\n\x08\x66\x65\x61tures\x18# \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x43\n\x14uninterpreted_option\x18\xe7\x07 \x03(\x0b\x32$.google.protobuf.UninterpretedOption\"P\n\x10IdempotencyLevel\x12\x17\n\x13IDEMPOTENCY_UNKNOWN\x10\x00\x12\x13\n\x0fNO_SIDE_EFFECTS\x10\x01\x12\x0e\n\nIDEMPOTENT\x10\x02*\t\x08\xe8\x07\x10\x80\x80\x80\x80\x02\"\x9e\x02\n\x13UninterpretedOption\x12;\n\x04name\x18\x02 \x03(\x0b\x32-.google.protobuf.UninterpretedOption.NamePart\x12\x18\n\x10identifier_value\x18\x03 \x01(\t\x12\x1a\n\x12positive_int_value\x18\x04 \x01(\x04\x12\x1a\n\x12negative_int_value\x18\x05 \x01(\x03\x12\x14\n\x0c\x64ouble_value\x18\x06 \x01(\x01\x12\x14\n\x0cstring_value\x18\x07 \x01(\x0c\x12\x17\n\x0f\x61ggregate_value\x18\x08 \x01(\t\x1a\x33\n\x08NamePart\x12\x11\n\tname_part\x18\x01 \x02(\t\x12\x14\n\x0cis_extension\x18\x02 \x02(\x08\"\x83\x0e\n\nFeatureSet\x12\x82\x01\n\x0e\x66ield_presence\x18\x01 \x01(\x0e\x32).google.protobuf.FeatureSet.FieldPresenceB?\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08\x45XPLICIT\x18\x84\x07\xa2\x01\r\x12\x08IMPLICIT\x18\xe7\x07\xa2\x01\r\x12\x08\x45XPLICIT\x18\xe8\x07\xb2\x01\x03\x08\xe8\x07\x12\x62\n\tenum_type\x18\x02 \x01(\x0e\x32$.google.protobuf.FeatureSet.EnumTypeB)\x88\x01\x01\x98\x01\x06\x98\x01\x01\xa2\x01\x0b\x12\x06\x43LOSED\x18\x84\x07\xa2\x01\t\x12\x04OPEN\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12\x81\x01\n\x17repeated_field_encoding\x18\x03 \x01(\x0e\x32\x31.google.protobuf.FeatureSet.RepeatedFieldEncodingB-\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\r\x12\x08\x45XPANDED\x18\x84\x07\xa2\x01\x0b\x12\x06PACKED\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12n\n\x0futf8_validation\x18\x04 \x01(\x0e\x32*.google.protobuf.FeatureSet.Utf8ValidationB)\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\t\x12\x04NONE\x18\x84\x07\xa2\x01\x0b\x12\x06VERIFY\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12m\n\x10message_encoding\x18\x05 \x01(\x0e\x32+.google.protobuf.FeatureSet.MessageEncodingB&\x88\x01\x01\x98\x01\x04\x98\x01\x01\xa2\x01\x14\x12\x0fLENGTH_PREFIXED\x18\x84\x07\xb2\x01\x03\x08\xe8\x07\x12v\n\x0bjson_format\x18\x06 \x01(\x0e\x32&.google.protobuf.FeatureSet.JsonFormatB9\x88\x01\x01\x98\x01\x03\x98\x01\x06\x98\x01\x01\xa2\x01\x17\x12\x12LEGACY_BEST_EFFORT\x18\x84\x07\xa2\x01\n\x12\x05\x41LLOW\x18\xe7\x07\xb2\x01\x03\x08\xe8\x07\x12\x97\x01\n\x14\x65nforce_naming_style\x18\x07 \x01(\x0e\x32..google.protobuf.FeatureSet.EnforceNamingStyleBI\x88\x01\x02\x98\x01\x01\x98\x01\x02\x98\x01\x03\x98\x01\x04\x98\x01\x05\x98\x01\x06\x98\x01\x07\x98\x01\x08\x98\x01\t\xa2\x01\x11\x12\x0cSTYLE_LEGACY\x18\x84\x07\xa2\x01\x0e\x12\tSTYLE2024\x18\xe9\x07\xb2\x01\x03\x08\xe9\x07\x12\xa0\x01\n\x19\x64\x65\x66\x61ult_symbol_visibility\x18\x08 \x01(\x0e\x32\x45.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibilityB6\x88\x01\x02\x98\x01\x01\xa2\x01\x0f\x12\nEXPORT_ALL\x18\x84\x07\xa2\x01\x15\x12\x10\x45XPORT_TOP_LEVEL\x18\xe9\x07\xb2\x01\x03\x08\xe9\x07\x1a\xa1\x01\n\x11VisibilityFeature\"\x81\x01\n\x17\x44\x65\x66\x61ultSymbolVisibility\x12%\n!DEFAULT_SYMBOL_VISIBILITY_UNKNOWN\x10\x00\x12\x0e\n\nEXPORT_ALL\x10\x01\x12\x14\n\x10\x45XPORT_TOP_LEVEL\x10\x02\x12\r\n\tLOCAL_ALL\x10\x03\x12\n\n\x06STRICT\x10\x04J\x08\x08\x01\x10\x80\x80\x80\x80\x02\"\\\n\rFieldPresence\x12\x1a\n\x16\x46IELD_PRESENCE_UNKNOWN\x10\x00\x12\x0c\n\x08\x45XPLICIT\x10\x01\x12\x0c\n\x08IMPLICIT\x10\x02\x12\x13\n\x0fLEGACY_REQUIRED\x10\x03\"7\n\x08\x45numType\x12\x15\n\x11\x45NUM_TYPE_UNKNOWN\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\"V\n\x15RepeatedFieldEncoding\x12#\n\x1fREPEATED_FIELD_ENCODING_UNKNOWN\x10\x00\x12\n\n\x06PACKED\x10\x01\x12\x0c\n\x08\x45XPANDED\x10\x02\"I\n\x0eUtf8Validation\x12\x1b\n\x17UTF8_VALIDATION_UNKNOWN\x10\x00\x12\n\n\x06VERIFY\x10\x02\x12\x08\n\x04NONE\x10\x03\"\x04\x08\x01\x10\x01\"S\n\x0fMessageEncoding\x12\x1c\n\x18MESSAGE_ENCODING_UNKNOWN\x10\x00\x12\x13\n\x0fLENGTH_PREFIXED\x10\x01\x12\r\n\tDELIMITED\x10\x02\"H\n\nJsonFormat\x12\x17\n\x13JSON_FORMAT_UNKNOWN\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x16\n\x12LEGACY_BEST_EFFORT\x10\x02\"W\n\x12\x45nforceNamingStyle\x12 \n\x1c\x45NFORCE_NAMING_STYLE_UNKNOWN\x10\x00\x12\r\n\tSTYLE2024\x10\x01\x12\x10\n\x0cSTYLE_LEGACY\x10\x02*\x06\x08\xe8\x07\x10\x8bN*\x06\x08\x8bN\x10\x90N*\x06\x08\x90N\x10\x91NJ\x06\x08\xe7\x07\x10\xe8\x07\"\x98\x03\n\x12\x46\x65\x61tureSetDefaults\x12N\n\x08\x64\x65\x66\x61ults\x18\x01 \x03(\x0b\x32<.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault\x12\x31\n\x0fminimum_edition\x18\x04 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x31\n\x0fmaximum_edition\x18\x05 \x01(\x0e\x32\x18.google.protobuf.Edition\x1a\xcb\x01\n\x18\x46\x65\x61tureSetEditionDefault\x12)\n\x07\x65\x64ition\x18\x03 \x01(\x0e\x32\x18.google.protobuf.Edition\x12\x39\n\x14overridable_features\x18\x04 \x01(\x0b\x32\x1b.google.protobuf.FeatureSet\x12\x33\n\x0e\x66ixed_features\x18\x05 \x01(\x0b\x32\x1b.google.protobuf.FeatureSetJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03R\x08\x66\x65\x61tures\"\xe3\x01\n\x0eSourceCodeInfo\x12:\n\x08location\x18\x01 \x03(\x0b\x32(.google.protobuf.SourceCodeInfo.Location\x1a\x86\x01\n\x08Location\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x10\n\x04span\x18\x02 \x03(\x05\x42\x02\x10\x01\x12\x18\n\x10leading_comments\x18\x03 \x01(\t\x12\x19\n\x11trailing_comments\x18\x04 \x01(\t\x12!\n\x19leading_detached_comments\x18\x06 \x03(\t*\x0c\x08\x80\xec\xca\xff\x01\x10\x81\xec\xca\xff\x01\"\x9c\x02\n\x11GeneratedCodeInfo\x12\x41\n\nannotation\x18\x01 \x03(\x0b\x32-.google.protobuf.GeneratedCodeInfo.Annotation\x1a\xc3\x01\n\nAnnotation\x12\x10\n\x04path\x18\x01 \x03(\x05\x42\x02\x10\x01\x12\x13\n\x0bsource_file\x18\x02 \x01(\t\x12\r\n\x05\x62\x65gin\x18\x03 \x01(\x05\x12\x0b\n\x03\x65nd\x18\x04 \x01(\x05\x12H\n\x08semantic\x18\x05 \x01(\x0e\x32\x36.google.protobuf.GeneratedCodeInfo.Annotation.Semantic\"(\n\x08Semantic\x12\x08\n\x04NONE\x10\x00\x12\x07\n\x03SET\x10\x01\x12\t\n\x05\x41LIAS\x10\x02*\xa7\x02\n\x07\x45\x64ition\x12\x13\n\x0f\x45\x44ITION_UNKNOWN\x10\x00\x12\x13\n\x0e\x45\x44ITION_LEGACY\x10\x84\x07\x12\x13\n\x0e\x45\x44ITION_PROTO2\x10\xe6\x07\x12\x13\n\x0e\x45\x44ITION_PROTO3\x10\xe7\x07\x12\x11\n\x0c\x45\x44ITION_2023\x10\xe8\x07\x12\x11\n\x0c\x45\x44ITION_2024\x10\xe9\x07\x12\x17\n\x13\x45\x44ITION_1_TEST_ONLY\x10\x01\x12\x17\n\x13\x45\x44ITION_2_TEST_ONLY\x10\x02\x12\x1d\n\x17\x45\x44ITION_99997_TEST_ONLY\x10\x9d\x8d\x06\x12\x1d\n\x17\x45\x44ITION_99998_TEST_ONLY\x10\x9e\x8d\x06\x12\x1d\n\x17\x45\x44ITION_99999_TEST_ONLY\x10\x9f\x8d\x06\x12\x13\n\x0b\x45\x44ITION_MAX\x10\xff\xff\xff\xff\x07*U\n\x10SymbolVisibility\x12\x14\n\x10VISIBILITY_UNSET\x10\x00\x12\x14\n\x10VISIBILITY_LOCAL\x10\x01\x12\x15\n\x11VISIBILITY_EXPORT\x10\x02\x42~\n\x13\x63om.google.protobufB\x10\x44\x65scriptorProtosH\x01Z-google.golang.org/protobuf/types/descriptorpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1aGoogle.Protobuf.Reflection"
|
9
9
|
|
10
10
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
11
11
|
pool.add_serialized_file(descriptor_data)
|
@@ -254,7 +254,7 @@ module Google
|
|
254
254
|
decoding_options = 0
|
255
255
|
unless options.is_a? Hash
|
256
256
|
if options.respond_to? :to_h
|
257
|
-
options options.to_h
|
257
|
+
options = options.to_h
|
258
258
|
else
|
259
259
|
#TODO can this error message be improve to include what was received?
|
260
260
|
raise ArgumentError.new "Expected hash arguments"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-protobuf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.33.0.rc.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Protobuf Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bigdecimal
|
@@ -189,7 +189,7 @@ homepage: https://developers.google.com/protocol-buffers
|
|
189
189
|
licenses:
|
190
190
|
- BSD-3-Clause
|
191
191
|
metadata:
|
192
|
-
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.
|
192
|
+
source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v4.33.0-rc1/ruby
|
193
193
|
post_install_message:
|
194
194
|
rdoc_options: []
|
195
195
|
require_paths:
|