diff options
-rw-r--r-- | google/protobuf/descriptor.upb.c | 3 | ||||
-rw-r--r-- | google/protobuf/descriptor.upb.h | 2 | ||||
-rw-r--r-- | upb/decode.c | 6 |
3 files changed, 8 insertions, 3 deletions
diff --git a/google/protobuf/descriptor.upb.c b/google/protobuf/descriptor.upb.c index 763fe3e..2a64717 100644 --- a/google/protobuf/descriptor.upb.c +++ b/google/protobuf/descriptor.upb.c @@ -10,6 +10,7 @@ #include "upb/msg.h" #include "google/protobuf/descriptor.upb.h" +#include "upb/port_def.inc" static const upb_msglayout *const google_protobuf_FileDescriptorSet_submsgs[1] = { &google_protobuf_FileDescriptorProto_msginit, @@ -532,3 +533,5 @@ const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit = { UPB_SIZE(32, 48), 4, 0, false, true }; +#include "upb/port_undef.inc" + diff --git a/google/protobuf/descriptor.upb.h b/google/protobuf/descriptor.upb.h index daa299d..07ce6f1 100644 --- a/google/protobuf/descriptor.upb.h +++ b/google/protobuf/descriptor.upb.h @@ -43,6 +43,7 @@ typedef struct google_protobuf_SourceCodeInfo { int a; } google_protobuf_SourceC typedef struct google_protobuf_SourceCodeInfo_Location { int a; } google_protobuf_SourceCodeInfo_Location; typedef struct google_protobuf_GeneratedCodeInfo { int a; } google_protobuf_GeneratedCodeInfo; typedef struct google_protobuf_GeneratedCodeInfo_Annotation { int a; } google_protobuf_GeneratedCodeInfo_Annotation; + /* Enums */ typedef enum { @@ -800,6 +801,7 @@ UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_prot UPB_END_EXTERN_C + #include "upb/port_undef.inc" #endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */ diff --git a/upb/decode.c b/upb/decode.c index 1f3e4d8..2819e0f 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -216,7 +216,7 @@ static upb_array *upb_getarr(upb_decframe *frame, return *(upb_array**)&frame->msg[field->offset]; } -static upb_array *upb_getorcreatearr(upb_decstate *d, upb_decframe *frame, +static upb_array *upb_getorcreatearr(upb_decframe *frame, const upb_msglayout_field *field) { upb_array *arr = upb_getarr(frame, field); @@ -251,7 +251,7 @@ static char *upb_decode_prepareslot(upb_decstate *d, upb_decframe *frame, upb_array *arr; if (field->label == UPB_LABEL_REPEATED) { - arr = upb_getorcreatearr(d, frame, field); + arr = upb_getorcreatearr(frame, field); field_mem = upb_array_reserve(arr, 1); } @@ -403,7 +403,7 @@ static bool upb_decode_toarray(upb_decstate *d, upb_decframe *frame, const char *field_start, const upb_msglayout_field *field, upb_stringview val) { - upb_array *arr = upb_getorcreatearr(d, frame, field); + upb_array *arr = upb_getorcreatearr(frame, field); #define VARINT_CASE(ctype, decode) { \ const char *ptr = val.data; \ |