Skip to content

Commit 7b1cebd

Browse files
Auto-generate files after cl/836967473
1 parent 814a54e commit 7b1cebd

File tree

4 files changed

+30
-20
lines changed

4 files changed

+30
-20
lines changed

php/ext/google/protobuf/php-upb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9127,7 +9127,7 @@ static upb_UnknownFields* upb_UnknownFields_Build(upb_UnknownField_Context* ctx,
91279127
uintptr_t iter = kUpb_Message_UnknownBegin;
91289128
upb_StringView view;
91299129
while (upb_Message_NextUnknown(msg, &view, &iter)) {
9130-
upb_EpsCopyInputStream_Init(&ctx->stream, &view.data, view.size, true);
9130+
upb_EpsCopyInputStream_Init(&ctx->stream, &view.data, view.size);
91319131
upb_CombineUnknownFields(ctx, &builder, &view.data);
91329132
UPB_ASSERT(upb_EpsCopyInputStream_IsDone(&ctx->stream, &view.data) &&
91339133
!upb_EpsCopyInputStream_IsError(&ctx->stream));
@@ -17067,7 +17067,7 @@ static const char* _upb_Decoder_DecodeUnknownField(upb_Decoder* d,
1706717067
}
1706817068

1706917069
upb_AddUnknownMode mode = kUpb_AddUnknown_Copy;
17070-
if (d->input.aliasing) {
17070+
if (d->options & kUpb_DecodeOption_AliasString) {
1707117071
if (sv.data != d->input.buffer_start) {
1707217072
// If the data is not from the beginning of the input buffer, then we can
1707317073
// safely attempt to coalesce this region with the previous one.

php/ext/google/protobuf/php-upb.h

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15957,7 +15957,6 @@ struct upb_EpsCopyInputStream {
1595715957
const char* capture_start; // If non-NULL, the start of the captured region.
1595815958
int limit; // Submessage limit relative to end
1595915959
bool error; // To distinguish between EOF and error.
15960-
bool aliasing;
1596115960
#ifndef NDEBUG
1596215961
int guaranteed_bytes;
1596315962
#endif
@@ -15976,8 +15975,7 @@ UPB_INLINE bool upb_EpsCopyInputStream_IsError(
1597615975
}
1597715976

1597815977
UPB_INLINE void upb_EpsCopyInputStream_Init(struct upb_EpsCopyInputStream* e,
15979-
const char** ptr, size_t size,
15980-
bool enable_aliasing) {
15978+
const char** ptr, size_t size) {
1598115979
e->buffer_start = *ptr;
1598215980
e->capture_start = NULL;
1598315981
if (size <= kUpb_EpsCopyInputStream_SlopBytes) {
@@ -15992,7 +15990,6 @@ UPB_INLINE void upb_EpsCopyInputStream_Init(struct upb_EpsCopyInputStream* e,
1599215990
e->limit = kUpb_EpsCopyInputStream_SlopBytes;
1599315991
e->input_delta = 0;
1599415992
}
15995-
e->aliasing = enable_aliasing;
1599615993
e->limit_ptr = e->end;
1599715994
e->error = false;
1599815995
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(e);
@@ -16331,8 +16328,7 @@ typedef struct upb_EpsCopyInputStream upb_EpsCopyInputStream;
1633116328
// [*ptr, size]. Updates `*ptr` as necessary to guarantee that at least
1633216329
// kUpb_EpsCopyInputStream_SlopBytes are available to read.
1633316330
UPB_INLINE void upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e,
16334-
const char** ptr, size_t size,
16335-
bool enable_aliasing);
16331+
const char** ptr, size_t size);
1633616332

1633716333
// Returns true if the stream is in the error state. A stream enters the error
1633816334
// state when the user reads past a limit (caught in IsDone()) or the
@@ -16421,6 +16417,16 @@ UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast(
1642116417
} /* extern "C" */
1642216418
#endif
1642316419

16420+
#ifdef __cplusplus
16421+
// Temporary overloads for functions whose signature has recently changed.
16422+
UPB_DEPRECATE_AND_INLINE()
16423+
UPB_INLINE void upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e,
16424+
const char** ptr, size_t size,
16425+
bool enable_aliasing) {
16426+
upb_EpsCopyInputStream_Init(e, ptr, size);
16427+
}
16428+
#endif
16429+
1642416430

1642516431
#endif // UPB_WIRE_EPS_COPY_INPUT_STREAM_H_
1642616432

@@ -17694,8 +17700,7 @@ UPB_INLINE const char* upb_Decoder_Init(upb_Decoder* d, const char* buf,
1769417700
const upb_ExtensionRegistry* extreg,
1769517701
int options, upb_Arena* arena,
1769617702
char* trace_buf, size_t trace_size) {
17697-
upb_EpsCopyInputStream_Init(&d->input, &buf, size,
17698-
options & kUpb_DecodeOption_AliasString);
17703+
upb_EpsCopyInputStream_Init(&d->input, &buf, size);
1769917704

1770017705
if (options & kUpb_DecodeOption_AlwaysValidateUtf8) {
1770117706
// Fasttable decoder does not support this option.

ruby/ext/google/protobuf_c/ruby-upb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7983,7 +7983,7 @@ static upb_UnknownFields* upb_UnknownFields_Build(upb_UnknownField_Context* ctx,
79837983
uintptr_t iter = kUpb_Message_UnknownBegin;
79847984
upb_StringView view;
79857985
while (upb_Message_NextUnknown(msg, &view, &iter)) {
7986-
upb_EpsCopyInputStream_Init(&ctx->stream, &view.data, view.size, true);
7986+
upb_EpsCopyInputStream_Init(&ctx->stream, &view.data, view.size);
79877987
upb_CombineUnknownFields(ctx, &builder, &view.data);
79887988
UPB_ASSERT(upb_EpsCopyInputStream_IsDone(&ctx->stream, &view.data) &&
79897989
!upb_EpsCopyInputStream_IsError(&ctx->stream));
@@ -16615,7 +16615,7 @@ static const char* _upb_Decoder_DecodeUnknownField(upb_Decoder* d,
1661516615
}
1661616616

1661716617
upb_AddUnknownMode mode = kUpb_AddUnknown_Copy;
16618-
if (d->input.aliasing) {
16618+
if (d->options & kUpb_DecodeOption_AliasString) {
1661916619
if (sv.data != d->input.buffer_start) {
1662016620
// If the data is not from the beginning of the input buffer, then we can
1662116621
// safely attempt to coalesce this region with the previous one.

ruby/ext/google/protobuf_c/ruby-upb.h

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15711,7 +15711,6 @@ struct upb_EpsCopyInputStream {
1571115711
const char* capture_start; // If non-NULL, the start of the captured region.
1571215712
int limit; // Submessage limit relative to end
1571315713
bool error; // To distinguish between EOF and error.
15714-
bool aliasing;
1571515714
#ifndef NDEBUG
1571615715
int guaranteed_bytes;
1571715716
#endif
@@ -15730,8 +15729,7 @@ UPB_INLINE bool upb_EpsCopyInputStream_IsError(
1573015729
}
1573115730

1573215731
UPB_INLINE void upb_EpsCopyInputStream_Init(struct upb_EpsCopyInputStream* e,
15733-
const char** ptr, size_t size,
15734-
bool enable_aliasing) {
15732+
const char** ptr, size_t size) {
1573515733
e->buffer_start = *ptr;
1573615734
e->capture_start = NULL;
1573715735
if (size <= kUpb_EpsCopyInputStream_SlopBytes) {
@@ -15746,7 +15744,6 @@ UPB_INLINE void upb_EpsCopyInputStream_Init(struct upb_EpsCopyInputStream* e,
1574615744
e->limit = kUpb_EpsCopyInputStream_SlopBytes;
1574715745
e->input_delta = 0;
1574815746
}
15749-
e->aliasing = enable_aliasing;
1575015747
e->limit_ptr = e->end;
1575115748
e->error = false;
1575215749
UPB_PRIVATE(upb_EpsCopyInputStream_BoundsChecked)(e);
@@ -16085,8 +16082,7 @@ typedef struct upb_EpsCopyInputStream upb_EpsCopyInputStream;
1608516082
// [*ptr, size]. Updates `*ptr` as necessary to guarantee that at least
1608616083
// kUpb_EpsCopyInputStream_SlopBytes are available to read.
1608716084
UPB_INLINE void upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e,
16088-
const char** ptr, size_t size,
16089-
bool enable_aliasing);
16085+
const char** ptr, size_t size);
1609016086

1609116087
// Returns true if the stream is in the error state. A stream enters the error
1609216088
// state when the user reads past a limit (caught in IsDone()) or the
@@ -16175,6 +16171,16 @@ UPB_FORCEINLINE bool upb_EpsCopyInputStream_TryParseDelimitedFast(
1617516171
} /* extern "C" */
1617616172
#endif
1617716173

16174+
#ifdef __cplusplus
16175+
// Temporary overloads for functions whose signature has recently changed.
16176+
UPB_DEPRECATE_AND_INLINE()
16177+
UPB_INLINE void upb_EpsCopyInputStream_Init(upb_EpsCopyInputStream* e,
16178+
const char** ptr, size_t size,
16179+
bool enable_aliasing) {
16180+
upb_EpsCopyInputStream_Init(e, ptr, size);
16181+
}
16182+
#endif
16183+
1617816184

1617916185
#endif // UPB_WIRE_EPS_COPY_INPUT_STREAM_H_
1618016186

@@ -17533,8 +17539,7 @@ UPB_INLINE const char* upb_Decoder_Init(upb_Decoder* d, const char* buf,
1753317539
const upb_ExtensionRegistry* extreg,
1753417540
int options, upb_Arena* arena,
1753517541
char* trace_buf, size_t trace_size) {
17536-
upb_EpsCopyInputStream_Init(&d->input, &buf, size,
17537-
options & kUpb_DecodeOption_AliasString);
17542+
upb_EpsCopyInputStream_Init(&d->input, &buf, size);
1753817543

1753917544
if (options & kUpb_DecodeOption_AlwaysValidateUtf8) {
1754017545
// Fasttable decoder does not support this option.

0 commit comments

Comments
 (0)