Auto-generate files after cl/672592274

pull/18193/head
Protobuf Team Bot 3 months ago
parent 4d75c8224a
commit 9efb6064a9
  1. 5
      php/ext/google/protobuf/php-upb.c
  2. 24
      php/ext/google/protobuf/php-upb.h
  3. 5
      ruby/ext/google/protobuf_c/ruby-upb.c
  4. 24
      ruby/ext/google/protobuf_c/ruby-upb.h

@ -1183,7 +1183,6 @@ static upb_MessageValue jsondec_int(jsondec* d, const upb_FieldDef* f) {
/* Parse UINT32 or UINT64 value. */
static upb_MessageValue jsondec_uint(jsondec* d, const upb_FieldDef* f) {
upb_MessageValue val;
memset(&val, 0, sizeof(val));
switch (jsondec_peek(d)) {
case JD_NUMBER: {
@ -1221,7 +1220,6 @@ static upb_MessageValue jsondec_uint(jsondec* d, const upb_FieldDef* f) {
static upb_MessageValue jsondec_double(jsondec* d, const upb_FieldDef* f) {
upb_StringView str;
upb_MessageValue val;
memset(&val, 0, sizeof(val));
switch (jsondec_peek(d)) {
case JD_NUMBER:
@ -15763,8 +15761,7 @@ bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m,
const upb_MiniTable* mt = upb_MessageDef_MiniTable(m);
size_t i = *iter;
size_t n = upb_MiniTable_FieldCount(mt);
upb_MessageValue zero;
memset(&zero, 0, sizeof(zero));
upb_MessageValue zero = upb_MessageValue_Zero();
UPB_UNUSED(ext_pool);
// Iterate over normal fields, returning the first one that is set.

@ -1497,7 +1497,14 @@ UPB_API_INLINE size_t upb_Array_Size(const struct upb_Array* arr) {
#define UPB_MESSAGE_VALUE_H_
#include <stdint.h>
#include <string.h>
// Must be last.
#ifdef __cplusplus
extern "C" {
#endif
typedef union {
bool bool_val;
@ -1519,12 +1526,29 @@ typedef union {
uintptr_t tagged_msg_val; // upb_TaggedMessagePtr
} upb_MessageValue;
UPB_API_INLINE upb_MessageValue upb_MessageValue_Zero(void) {
upb_MessageValue zero;
memset(&zero, 0, sizeof(zero));
return zero;
}
typedef union {
struct upb_Array* array;
struct upb_Map* map;
struct upb_Message* msg;
} upb_MutableMessageValue;
UPB_API_INLINE upb_MutableMessageValue upb_MutableMessageValue_Zero(void) {
upb_MutableMessageValue zero;
memset(&zero, 0, sizeof(zero));
return zero;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* UPB_MESSAGE_VALUE_H_ */
#ifndef UPB_MINI_TABLE_FIELD_H_

@ -1183,7 +1183,6 @@ static upb_MessageValue jsondec_int(jsondec* d, const upb_FieldDef* f) {
/* Parse UINT32 or UINT64 value. */
static upb_MessageValue jsondec_uint(jsondec* d, const upb_FieldDef* f) {
upb_MessageValue val;
memset(&val, 0, sizeof(val));
switch (jsondec_peek(d)) {
case JD_NUMBER: {
@ -1221,7 +1220,6 @@ static upb_MessageValue jsondec_uint(jsondec* d, const upb_FieldDef* f) {
static upb_MessageValue jsondec_double(jsondec* d, const upb_FieldDef* f) {
upb_StringView str;
upb_MessageValue val;
memset(&val, 0, sizeof(val));
switch (jsondec_peek(d)) {
case JD_NUMBER:
@ -15251,8 +15249,7 @@ bool upb_Message_Next(const upb_Message* msg, const upb_MessageDef* m,
const upb_MiniTable* mt = upb_MessageDef_MiniTable(m);
size_t i = *iter;
size_t n = upb_MiniTable_FieldCount(mt);
upb_MessageValue zero;
memset(&zero, 0, sizeof(zero));
upb_MessageValue zero = upb_MessageValue_Zero();
UPB_UNUSED(ext_pool);
// Iterate over normal fields, returning the first one that is set.

@ -1499,7 +1499,14 @@ UPB_API_INLINE size_t upb_Array_Size(const struct upb_Array* arr) {
#define UPB_MESSAGE_VALUE_H_
#include <stdint.h>
#include <string.h>
// Must be last.
#ifdef __cplusplus
extern "C" {
#endif
typedef union {
bool bool_val;
@ -1521,12 +1528,29 @@ typedef union {
uintptr_t tagged_msg_val; // upb_TaggedMessagePtr
} upb_MessageValue;
UPB_API_INLINE upb_MessageValue upb_MessageValue_Zero(void) {
upb_MessageValue zero;
memset(&zero, 0, sizeof(zero));
return zero;
}
typedef union {
struct upb_Array* array;
struct upb_Map* map;
struct upb_Message* msg;
} upb_MutableMessageValue;
UPB_API_INLINE upb_MutableMessageValue upb_MutableMessageValue_Zero(void) {
upb_MutableMessageValue zero;
memset(&zero, 0, sizeof(zero));
return zero;
}
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* UPB_MESSAGE_VALUE_H_ */
#ifndef UPB_MINI_TABLE_FIELD_H_

Loading…
Cancel
Save