Skip to content

Commit

Permalink
Auto-generate files after cl/696258062
Browse files Browse the repository at this point in the history
  • Loading branch information
protobuf-team-bot committed Nov 13, 2024
1 parent e802d88 commit 3e7719c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions php/ext/google/protobuf/php-upb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3944,6 +3944,14 @@ bool upb_Message_NextUnknown(const upb_Message* msg, upb_StringView* data,
return false;
}

bool upb_Message_HasUnknown(const upb_Message* msg) {
const upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg);
if (in) {
return in->unknown_end > message_overhead;
}
return false;
}

const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len) {
upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg);
if (in) {
Expand Down
2 changes: 2 additions & 0 deletions php/ext/google/protobuf/php-upb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2403,6 +2403,8 @@ UPB_API upb_Message* upb_Message_New(const upb_MiniTable* m, upb_Arena* arena);
bool upb_Message_NextUnknown(const upb_Message* msg, upb_StringView* data,
uintptr_t* iter);

bool upb_Message_HasUnknown(const upb_Message* msg);

// Returns a reference to the message's unknown data.
const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len);

Expand Down
8 changes: 8 additions & 0 deletions ruby/ext/google/protobuf_c/ruby-upb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3944,6 +3944,14 @@ bool upb_Message_NextUnknown(const upb_Message* msg, upb_StringView* data,
return false;
}

bool upb_Message_HasUnknown(const upb_Message* msg) {
const upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg);
if (in) {
return in->unknown_end > message_overhead;
}
return false;
}

const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len) {
upb_Message_Internal* in = UPB_PRIVATE(_upb_Message_GetInternal)(msg);
if (in) {
Expand Down
2 changes: 2 additions & 0 deletions ruby/ext/google/protobuf_c/ruby-upb.h
Original file line number Diff line number Diff line change
Expand Up @@ -2405,6 +2405,8 @@ UPB_API upb_Message* upb_Message_New(const upb_MiniTable* m, upb_Arena* arena);
bool upb_Message_NextUnknown(const upb_Message* msg, upb_StringView* data,
uintptr_t* iter);

bool upb_Message_HasUnknown(const upb_Message* msg);

// Returns a reference to the message's unknown data.
const char* upb_Message_GetUnknown(const upb_Message* msg, size_t* len);

Expand Down

0 comments on commit 3e7719c

Please sign in to comment.