@ -636,6 +636,48 @@ void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
/* Returns a reference to the message's unknown data. */
/* Returns a reference to the message's unknown data. */
const char * upb_msg_getunknown ( const upb_msg * msg , size_t * len ) ;
const char * upb_msg_getunknown ( const upb_msg * msg , size_t * len ) ;
/** upb_extreg *******************************************************************/
/* Extension registry: a dynamic data structure that stores a map of:
* ( upb_msglayout , number ) - > extension info
*
* upb_decode ( ) uses upb_extreg to look up extensions while parsing binary
* format .
*
* upb_extreg is part of the mini - table ( msglayout ) family of objects . Like all
* mini - table objects , it is suitable for reflection - less builds that do not
* want to expose names into the binary .
*
* Unlike most mini - table types , upb_extreg requires dynamic memory allocation
* and dynamic initialization :
* * If reflection is being used , then upb_symtab will construct an appropriate
* upb_extreg automatically .
* * For a mini - table only build , the user must manually construct the
* upb_extreg and populate it with all of the extensions the user cares about .
* * A third alternative is to manually unpack relevant extensions after the
* main parse is complete , similar to how Any works . This is perhaps the
* nicest solution from the perspective of reducing dependencies , avoiding
* dynamic memory allocation , and avoiding the need to parse uninteresting
* extensions . The downsides are :
* ( 1 ) parse errors are not caught during the main parse
* ( 2 ) the CPU hit of parsing comes during access , which could cause an
* undesirable stutter in application performance .
*
* Users cannot directly get or put into this map . Users can only add the
* extensions from a generated module and pass the extension registry to the
* binary decoder .
*
* A upb_symtab provides a upb_extreg , so any users who use reflection do not
* need to populate a upb_extreg directly .
*/
struct upb_extreg ;
typedef struct upb_extreg upb_extreg ;
/* Creates a upb_extreg in the given arena. The arena must outlive any use of
* the extreg . */
upb_extreg * upb_extreg_new ( upb_arena * arena ) ;
# ifdef __cplusplus
# ifdef __cplusplus
} /* extern "C" */
} /* extern "C" */
# endif
# endif
@ -657,12 +699,13 @@ enum {
# define UPB_DECODE_MAXDEPTH(depth) ((depth) << 16)
# define UPB_DECODE_MAXDEPTH(depth) ((depth) << 16)
bool _upb_decode ( const char * buf , size_t size , upb_msg * msg ,
bool _upb_decode ( const char * buf , size_t size , upb_msg * msg ,
const upb_msglayout * l , upb_arena * arena , int options ) ;
const upb_msglayout * l , const upb_extreg * extreg , int options ,
upb_arena * arena ) ;
UPB_INLINE
UPB_INLINE
bool upb_decode ( const char * buf , size_t size , upb_msg * msg ,
bool upb_decode ( const char * buf , size_t size , upb_msg * msg ,
const upb_msglayout * l , upb_arena * arena ) {
const upb_msglayout * l , upb_arena * arena ) {
return _upb_decode ( buf , size , msg , l , arena , 0 ) ;
return _upb_decode ( buf , size , msg , l , NULL , 0 , arena ) ;
}
}
# ifdef __cplusplus
# ifdef __cplusplus
@ -836,6 +879,10 @@ typedef struct upb_tabval {
/* upb_table ******************************************************************/
/* upb_table ******************************************************************/
uint64_t Wyhash ( const void * data , size_t len , uint64_t seed ,
const uint64_t salt [ ] ) ;
extern const uint64_t kWyhashSalt [ 5 ] ;
typedef struct _upb_tabent {
typedef struct _upb_tabent {
upb_tabkey key ;
upb_tabkey key ;
upb_tabval val ;
upb_tabval val ;
@ -1047,9 +1094,34 @@ typedef struct {
int16_t presence ; /* If >0, hasbit_index. If <0, ~oneof_index. */
int16_t presence ; /* If >0, hasbit_index. If <0, ~oneof_index. */
uint16_t submsg_index ; /* undefined if descriptortype != MESSAGE or GROUP. */
uint16_t submsg_index ; /* undefined if descriptortype != MESSAGE or GROUP. */
uint8_t descriptortype ;
uint8_t descriptortype ;
uint8_t label ; /* google.protobuf.Label or _UPB_LABEL_* above. */
int8_t mode ; /* upb_fieldmode, with flags from upb_labelflags */
} upb_msglayout_field ;
} upb_msglayout_field ;
typedef enum {
_UPB_MODE_MAP = 0 ,
_UPB_MODE_ARRAY = 1 ,
_UPB_MODE_SCALAR = 2 ,
} upb_fieldmode ;
/* Extra flags on the mode field. */
enum upb_labelflags {
_UPB_MODE_IS_PACKED = 4 ,
} ;
UPB_INLINE upb_fieldmode _upb_getmode ( const upb_msglayout_field * field ) {
return ( upb_fieldmode ) ( field - > mode & 3 ) ;
}
UPB_INLINE bool _upb_repeated_or_map ( const upb_msglayout_field * field ) {
/* This works because upb_fieldmode has no value 3. */
return ! ( field - > mode & _UPB_MODE_SCALAR ) ;
}
UPB_INLINE bool _upb_issubmsg ( const upb_msglayout_field * field ) {
return field - > descriptortype = = UPB_DTYPE_MESSAGE | |
field - > descriptortype = = UPB_DTYPE_GROUP ;
}
struct upb_decstate ;
struct upb_decstate ;
struct upb_msglayout ;
struct upb_msglayout ;
@ -1070,27 +1142,65 @@ struct upb_msglayout {
uint16_t size ;
uint16_t size ;
uint16_t field_count ;
uint16_t field_count ;
bool extendable ;
bool extendable ;
uint8_t dense_below ;
uint8_t table_mask ;
uint8_t table_mask ;
/* To constant-initialize the tables of variable length, we need a flexible
/* To constant-initialize the tables of variable length, we need a flexible
* array member , and we need to compile in C99 mode . */
* array member , and we need to compile in C99 mode . */
_upb_fasttable_entry fasttable [ ] ;
_upb_fasttable_entry fasttable [ ] ;
} ;
} ;
typedef struct {
upb_msglayout_field field ;
const upb_msglayout * extendee ;
const upb_msglayout * submsg ; /* NULL for non-submessage fields. */
} upb_msglayout_ext ;
/** upb_extreg ****************************************************************/
/* Adds the given extension info for message type |l| and field number |num|
* into the registry . Returns false if this message type and field number were
* already in the map , or if memory allocation fails . */
bool _upb_extreg_add ( upb_extreg * r , const upb_msglayout_ext * e , size_t count ) ;
/* Looks up the extension (if any) defined for message type |l| and field
* number | num | . If an extension was found , copies the field info into | * ext |
* and returns true . Otherwise returns false . */
const upb_msglayout_field * _upb_extreg_get ( const upb_extreg * r ,
const upb_msglayout * l ,
uint32_t num ) ;
/** upb_msg *******************************************************************/
/** upb_msg *******************************************************************/
/* Internal members of a upb_msg. We can change this without breaking binary
/* Internal members of a upb_msg that track unknown fields and/or extensions.
* compatibility . We put these before the user ' s data . The user ' s upb_msg *
* We can change this without breaking binary compatibility . We put these
* points after the upb_msg_internal . */
* before the user ' s data . The user ' s upb_msg * points after the
* upb_msg_internal . */
typedef struct {
typedef struct {
uint32_t len ;
/* Total size of this structure, including the data that follows.
* Must be aligned to 8 , which is alignof ( upb_msg_ext ) */
uint32_t size ;
uint32_t size ;
/* Data follows. */
} upb_msg_unknowndata ;
/* Used when a message is not extendable. */
/* Offsets relative to the beginning of this structure.
*
* Unknown data grows forward from the beginning to unknown_end .
* Extension data grows backward from size to ext_begin .
* When the two meet , we ' re out of data and have to realloc .
*
* If we imagine that the final member of this struct is :
* char data [ size - overhead ] ; // overhead = sizeof(upb_msg_internaldata)
*
* Then we have :
* unknown data : data [ 0 . . ( unknown_end - overhead ) ]
* extensions data : data [ ( ext_begin - overhead ) . . ( size - overhead ) ] */
uint32_t unknown_end ;
uint32_t ext_begin ;
/* Data follows, as if there were an array:
* char data [ size - sizeof ( upb_msg_internaldata ) ] ; */
} upb_msg_internaldata ;
typedef struct {
typedef struct {
upb_msg_unknowndata * unknown ;
upb_msg_internaldata * internal ;
} upb_msg_internal ;
} upb_msg_internal ;
/* Maps upb_fieldtype_t -> memory size. */
/* Maps upb_fieldtype_t -> memory size. */
@ -1129,6 +1239,35 @@ void _upb_msg_discardunknown_shallow(upb_msg *msg);
bool _upb_msg_addunknown ( upb_msg * msg , const char * data , size_t len ,
bool _upb_msg_addunknown ( upb_msg * msg , const char * data , size_t len ,
upb_arena * arena ) ;
upb_arena * arena ) ;
/** upb_msg_ext ***************************************************************/
/* The internal representation of an extension is self-describing: it contains
* enough information that we can serialize it to binary format without needing
* to look it up in a registry . */
typedef struct {
const upb_msglayout_ext * ext ;
union {
upb_strview str ;
void * ptr ;
double dbl ;
char scalar_data [ 8 ] ;
} data ;
} upb_msg_ext ;
/* Adds the given extension data to the given message. The returned extension will
* have its " ext " member initialized according to | ext | . */
upb_msg_ext * _upb_msg_getorcreateext ( upb_msg * msg , const upb_msglayout_ext * ext ,
upb_arena * arena ) ;
/* Returns an array of extensions for this message. Note: the array is
* ordered in reverse relative to the order of creation . */
const upb_msg_ext * _upb_msg_getexts ( const upb_msg * msg , size_t * count ) ;
/* Returns an extension for the given field number, or NULL if no extension
* exists for this field number . */
const upb_msg_ext * _upb_msg_getext ( const upb_msg * msg ,
const upb_msglayout_ext * ext ) ;
/** Hasbit access *************************************************************/
/** Hasbit access *************************************************************/
UPB_INLINE bool _upb_hasbit ( const upb_msg * msg , size_t idx ) {
UPB_INLINE bool _upb_hasbit ( const upb_msg * msg , size_t idx ) {
@ -1192,14 +1331,6 @@ UPB_INLINE bool _upb_has_submsg_nohasbit(const upb_msg *msg, size_t ofs) {
return * UPB_PTR_AT ( msg , ofs , const upb_msg * ) ! = NULL ;
return * UPB_PTR_AT ( msg , ofs , const upb_msg * ) ! = NULL ;
}
}
UPB_INLINE bool _upb_isrepeated ( const upb_msglayout_field * field ) {
return ( field - > label & 3 ) = = UPB_LABEL_REPEATED ;
}
UPB_INLINE bool _upb_repeated_or_map ( const upb_msglayout_field * field ) {
return field - > label > = UPB_LABEL_REPEATED ;
}
/** upb_array *****************************************************************/
/** upb_array *****************************************************************/
/* Our internal representation for repeated fields. */
/* Our internal representation for repeated fields. */
@ -2121,13 +2252,19 @@ UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_FileDescriptorSet * ret = google_protobuf_FileDescriptorSet_new ( arena ) ;
google_protobuf_FileDescriptorSet * ret = google_protobuf_FileDescriptorSet_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorSet_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorSet_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_FileDescriptorSet * ret = google_protobuf_FileDescriptorSet_new ( arena ) ;
google_protobuf_FileDescriptorSet * ret = google_protobuf_FileDescriptorSet_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorSet_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorSet_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_FileDescriptorSet_serialize ( const google_protobuf_FileDescriptorSet * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_FileDescriptorSet_serialize ( const google_protobuf_FileDescriptorSet * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_FileDescriptorSet_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_FileDescriptorSet_msginit , arena , len ) ;
@ -2158,13 +2295,19 @@ UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorPr
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_FileDescriptorProto * ret = google_protobuf_FileDescriptorProto_new ( arena ) ;
google_protobuf_FileDescriptorProto * ret = google_protobuf_FileDescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_FileDescriptorProto * ret = google_protobuf_FileDescriptorProto_new ( arena ) ;
google_protobuf_FileDescriptorProto * ret = google_protobuf_FileDescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_FileDescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_FileDescriptorProto_serialize ( const google_protobuf_FileDescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_FileDescriptorProto_serialize ( const google_protobuf_FileDescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_FileDescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_FileDescriptorProto_msginit , arena , len ) ;
@ -2321,13 +2464,19 @@ UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_DescriptorProto * ret = google_protobuf_DescriptorProto_new ( arena ) ;
google_protobuf_DescriptorProto * ret = google_protobuf_DescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_DescriptorProto * ret = google_protobuf_DescriptorProto_new ( arena ) ;
google_protobuf_DescriptorProto * ret = google_protobuf_DescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_DescriptorProto_serialize ( const google_protobuf_DescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_DescriptorProto_serialize ( const google_protobuf_DescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_DescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_DescriptorProto_msginit , arena , len ) ;
@ -2480,13 +2629,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_Descr
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_DescriptorProto_ExtensionRange * ret = google_protobuf_DescriptorProto_ExtensionRange_new ( arena ) ;
google_protobuf_DescriptorProto_ExtensionRange * ret = google_protobuf_DescriptorProto_ExtensionRange_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ExtensionRange_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ExtensionRange_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_DescriptorProto_ExtensionRange * ret = google_protobuf_DescriptorProto_ExtensionRange_new ( arena ) ;
google_protobuf_DescriptorProto_ExtensionRange * ret = google_protobuf_DescriptorProto_ExtensionRange_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ExtensionRange_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ExtensionRange_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_DescriptorProto_ExtensionRange_serialize ( const google_protobuf_DescriptorProto_ExtensionRange * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_DescriptorProto_ExtensionRange_serialize ( const google_protobuf_DescriptorProto_ExtensionRange * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_DescriptorProto_ExtensionRange_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_DescriptorProto_ExtensionRange_msginit , arena , len ) ;
@ -2529,13 +2684,19 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_Descri
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_DescriptorProto_ReservedRange * ret = google_protobuf_DescriptorProto_ReservedRange_new ( arena ) ;
google_protobuf_DescriptorProto_ReservedRange * ret = google_protobuf_DescriptorProto_ReservedRange_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ReservedRange_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ReservedRange_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_DescriptorProto_ReservedRange * ret = google_protobuf_DescriptorProto_ReservedRange_new ( arena ) ;
google_protobuf_DescriptorProto_ReservedRange * ret = google_protobuf_DescriptorProto_ReservedRange_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ReservedRange_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_DescriptorProto_ReservedRange_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_DescriptorProto_ReservedRange_serialize ( const google_protobuf_DescriptorProto_ReservedRange * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_DescriptorProto_ReservedRange_serialize ( const google_protobuf_DescriptorProto_ReservedRange * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_DescriptorProto_ReservedRange_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_DescriptorProto_ReservedRange_msginit , arena , len ) ;
@ -2563,13 +2724,19 @@ UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRange
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_ExtensionRangeOptions * ret = google_protobuf_ExtensionRangeOptions_new ( arena ) ;
google_protobuf_ExtensionRangeOptions * ret = google_protobuf_ExtensionRangeOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_ExtensionRangeOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_ExtensionRangeOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_ExtensionRangeOptions * ret = google_protobuf_ExtensionRangeOptions_new ( arena ) ;
google_protobuf_ExtensionRangeOptions * ret = google_protobuf_ExtensionRangeOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_ExtensionRangeOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_ExtensionRangeOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_ExtensionRangeOptions_serialize ( const google_protobuf_ExtensionRangeOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_ExtensionRangeOptions_serialize ( const google_protobuf_ExtensionRangeOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_ExtensionRangeOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_ExtensionRangeOptions_msginit , arena , len ) ;
@ -2600,13 +2767,19 @@ UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptor
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_FieldDescriptorProto * ret = google_protobuf_FieldDescriptorProto_new ( arena ) ;
google_protobuf_FieldDescriptorProto * ret = google_protobuf_FieldDescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_FieldDescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_FieldDescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_FieldDescriptorProto * ret = google_protobuf_FieldDescriptorProto_new ( arena ) ;
google_protobuf_FieldDescriptorProto * ret = google_protobuf_FieldDescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_FieldDescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_FieldDescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_FieldDescriptorProto_serialize ( const google_protobuf_FieldDescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_FieldDescriptorProto_serialize ( const google_protobuf_FieldDescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_FieldDescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_FieldDescriptorProto_msginit , arena , len ) ;
@ -2697,13 +2870,19 @@ UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptor
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_OneofDescriptorProto * ret = google_protobuf_OneofDescriptorProto_new ( arena ) ;
google_protobuf_OneofDescriptorProto * ret = google_protobuf_OneofDescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_OneofDescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_OneofDescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_OneofDescriptorProto * ret = google_protobuf_OneofDescriptorProto_new ( arena ) ;
google_protobuf_OneofDescriptorProto * ret = google_protobuf_OneofDescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_OneofDescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_OneofDescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_OneofDescriptorProto_serialize ( const google_protobuf_OneofDescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_OneofDescriptorProto_serialize ( const google_protobuf_OneofDescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_OneofDescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_OneofDescriptorProto_msginit , arena , len ) ;
@ -2740,13 +2919,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorPr
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_EnumDescriptorProto * ret = google_protobuf_EnumDescriptorProto_new ( arena ) ;
google_protobuf_EnumDescriptorProto * ret = google_protobuf_EnumDescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_EnumDescriptorProto * ret = google_protobuf_EnumDescriptorProto_new ( arena ) ;
google_protobuf_EnumDescriptorProto * ret = google_protobuf_EnumDescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_EnumDescriptorProto_serialize ( const google_protobuf_EnumDescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_EnumDescriptorProto_serialize ( const google_protobuf_EnumDescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_EnumDescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_EnumDescriptorProto_msginit , arena , len ) ;
@ -2824,13 +3009,19 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobu
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_EnumDescriptorProto_EnumReservedRange * ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new ( arena ) ;
google_protobuf_EnumDescriptorProto_EnumReservedRange * ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_EnumDescriptorProto_EnumReservedRange * ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new ( arena ) ;
google_protobuf_EnumDescriptorProto_EnumReservedRange * ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize ( const google_protobuf_EnumDescriptorProto_EnumReservedRange * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize ( const google_protobuf_EnumDescriptorProto_EnumReservedRange * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit , arena , len ) ;
@ -2858,13 +3049,19 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDe
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_EnumValueDescriptorProto * ret = google_protobuf_EnumValueDescriptorProto_new ( arena ) ;
google_protobuf_EnumValueDescriptorProto * ret = google_protobuf_EnumValueDescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_EnumValueDescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_EnumValueDescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_EnumValueDescriptorProto * ret = google_protobuf_EnumValueDescriptorProto_new ( arena ) ;
google_protobuf_EnumValueDescriptorProto * ret = google_protobuf_EnumValueDescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_EnumValueDescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_EnumValueDescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_EnumValueDescriptorProto_serialize ( const google_protobuf_EnumValueDescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_EnumValueDescriptorProto_serialize ( const google_protobuf_EnumValueDescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_EnumValueDescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_EnumValueDescriptorProto_msginit , arena , len ) ;
@ -2907,13 +3104,19 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescri
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_ServiceDescriptorProto * ret = google_protobuf_ServiceDescriptorProto_new ( arena ) ;
google_protobuf_ServiceDescriptorProto * ret = google_protobuf_ServiceDescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_ServiceDescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_ServiceDescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_ServiceDescriptorProto * ret = google_protobuf_ServiceDescriptorProto_new ( arena ) ;
google_protobuf_ServiceDescriptorProto * ret = google_protobuf_ServiceDescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_ServiceDescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_ServiceDescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_ServiceDescriptorProto_serialize ( const google_protobuf_ServiceDescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_ServiceDescriptorProto_serialize ( const google_protobuf_ServiceDescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_ServiceDescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_ServiceDescriptorProto_msginit , arena , len ) ;
@ -2965,13 +3168,19 @@ UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescript
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_MethodDescriptorProto * ret = google_protobuf_MethodDescriptorProto_new ( arena ) ;
google_protobuf_MethodDescriptorProto * ret = google_protobuf_MethodDescriptorProto_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_MethodDescriptorProto_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_MethodDescriptorProto_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_MethodDescriptorProto * ret = google_protobuf_MethodDescriptorProto_new ( arena ) ;
google_protobuf_MethodDescriptorProto * ret = google_protobuf_MethodDescriptorProto_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_MethodDescriptorProto_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_MethodDescriptorProto_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_MethodDescriptorProto_serialize ( const google_protobuf_MethodDescriptorProto * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_MethodDescriptorProto_serialize ( const google_protobuf_MethodDescriptorProto * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_MethodDescriptorProto_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_MethodDescriptorProto_msginit , arena , len ) ;
@ -3032,13 +3241,19 @@ UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_aren
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_FileOptions * ret = google_protobuf_FileOptions_new ( arena ) ;
google_protobuf_FileOptions * ret = google_protobuf_FileOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_FileOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_FileOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_FileOptions * ret = google_protobuf_FileOptions_new ( arena ) ;
google_protobuf_FileOptions * ret = google_protobuf_FileOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_FileOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_FileOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_FileOptions_serialize ( const google_protobuf_FileOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_FileOptions_serialize ( const google_protobuf_FileOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_FileOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_FileOptions_msginit , arena , len ) ;
@ -3189,13 +3404,19 @@ UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(up
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_MessageOptions * ret = google_protobuf_MessageOptions_new ( arena ) ;
google_protobuf_MessageOptions * ret = google_protobuf_MessageOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_MessageOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_MessageOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_MessageOptions * ret = google_protobuf_MessageOptions_new ( arena ) ;
google_protobuf_MessageOptions * ret = google_protobuf_MessageOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_MessageOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_MessageOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_MessageOptions_serialize ( const google_protobuf_MessageOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_MessageOptions_serialize ( const google_protobuf_MessageOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_MessageOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_MessageOptions_msginit , arena , len ) ;
@ -3250,13 +3471,19 @@ UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_ar
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_FieldOptions * ret = google_protobuf_FieldOptions_new ( arena ) ;
google_protobuf_FieldOptions * ret = google_protobuf_FieldOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_FieldOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_FieldOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_FieldOptions * ret = google_protobuf_FieldOptions_new ( arena ) ;
google_protobuf_FieldOptions * ret = google_protobuf_FieldOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_FieldOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_FieldOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_FieldOptions_serialize ( const google_protobuf_FieldOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_FieldOptions_serialize ( const google_protobuf_FieldOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_FieldOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_FieldOptions_msginit , arena , len ) ;
@ -3323,13 +3550,19 @@ UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_ar
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_OneofOptions * ret = google_protobuf_OneofOptions_new ( arena ) ;
google_protobuf_OneofOptions * ret = google_protobuf_OneofOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_OneofOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_OneofOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_OneofOptions * ret = google_protobuf_OneofOptions_new ( arena ) ;
google_protobuf_OneofOptions * ret = google_protobuf_OneofOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_OneofOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_OneofOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_OneofOptions_serialize ( const google_protobuf_OneofOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_OneofOptions_serialize ( const google_protobuf_OneofOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_OneofOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_OneofOptions_msginit , arena , len ) ;
@ -3360,13 +3593,19 @@ UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_aren
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_EnumOptions * ret = google_protobuf_EnumOptions_new ( arena ) ;
google_protobuf_EnumOptions * ret = google_protobuf_EnumOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_EnumOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_EnumOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_EnumOptions * ret = google_protobuf_EnumOptions_new ( arena ) ;
google_protobuf_EnumOptions * ret = google_protobuf_EnumOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_EnumOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_EnumOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_EnumOptions_serialize ( const google_protobuf_EnumOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_EnumOptions_serialize ( const google_protobuf_EnumOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_EnumOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_EnumOptions_msginit , arena , len ) ;
@ -3409,13 +3648,19 @@ UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_ne
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_EnumValueOptions * ret = google_protobuf_EnumValueOptions_new ( arena ) ;
google_protobuf_EnumValueOptions * ret = google_protobuf_EnumValueOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_EnumValueOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_EnumValueOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_EnumValueOptions * ret = google_protobuf_EnumValueOptions_new ( arena ) ;
google_protobuf_EnumValueOptions * ret = google_protobuf_EnumValueOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_EnumValueOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_EnumValueOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_EnumValueOptions_serialize ( const google_protobuf_EnumValueOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_EnumValueOptions_serialize ( const google_protobuf_EnumValueOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_EnumValueOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_EnumValueOptions_msginit , arena , len ) ;
@ -3452,13 +3697,19 @@ UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(up
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_ServiceOptions * ret = google_protobuf_ServiceOptions_new ( arena ) ;
google_protobuf_ServiceOptions * ret = google_protobuf_ServiceOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_ServiceOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_ServiceOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_ServiceOptions * ret = google_protobuf_ServiceOptions_new ( arena ) ;
google_protobuf_ServiceOptions * ret = google_protobuf_ServiceOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_ServiceOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_ServiceOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_ServiceOptions_serialize ( const google_protobuf_ServiceOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_ServiceOptions_serialize ( const google_protobuf_ServiceOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_ServiceOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_ServiceOptions_msginit , arena , len ) ;
@ -3495,13 +3746,19 @@ UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_MethodOptions * ret = google_protobuf_MethodOptions_new ( arena ) ;
google_protobuf_MethodOptions * ret = google_protobuf_MethodOptions_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_MethodOptions_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_MethodOptions_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_MethodOptions * ret = google_protobuf_MethodOptions_new ( arena ) ;
google_protobuf_MethodOptions * ret = google_protobuf_MethodOptions_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_MethodOptions_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_MethodOptions_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_MethodOptions_serialize ( const google_protobuf_MethodOptions * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_MethodOptions_serialize ( const google_protobuf_MethodOptions * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_MethodOptions_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_MethodOptions_msginit , arena , len ) ;
@ -3544,13 +3801,19 @@ UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOpt
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_UninterpretedOption * ret = google_protobuf_UninterpretedOption_new ( arena ) ;
google_protobuf_UninterpretedOption * ret = google_protobuf_UninterpretedOption_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_UninterpretedOption * ret = google_protobuf_UninterpretedOption_new ( arena ) ;
google_protobuf_UninterpretedOption * ret = google_protobuf_UninterpretedOption_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_UninterpretedOption_serialize ( const google_protobuf_UninterpretedOption * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_UninterpretedOption_serialize ( const google_protobuf_UninterpretedOption * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_UninterpretedOption_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_UninterpretedOption_msginit , arena , len ) ;
@ -3617,13 +3880,19 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_Uninter
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_UninterpretedOption_NamePart * ret = google_protobuf_UninterpretedOption_NamePart_new ( arena ) ;
google_protobuf_UninterpretedOption_NamePart * ret = google_protobuf_UninterpretedOption_NamePart_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_NamePart_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_NamePart_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_UninterpretedOption_NamePart * ret = google_protobuf_UninterpretedOption_NamePart_new ( arena ) ;
google_protobuf_UninterpretedOption_NamePart * ret = google_protobuf_UninterpretedOption_NamePart_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_NamePart_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_UninterpretedOption_NamePart_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_UninterpretedOption_NamePart_serialize ( const google_protobuf_UninterpretedOption_NamePart * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_UninterpretedOption_NamePart_serialize ( const google_protobuf_UninterpretedOption_NamePart * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_UninterpretedOption_NamePart_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_UninterpretedOption_NamePart_msginit , arena , len ) ;
@ -3651,13 +3920,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(up
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_SourceCodeInfo * ret = google_protobuf_SourceCodeInfo_new ( arena ) ;
google_protobuf_SourceCodeInfo * ret = google_protobuf_SourceCodeInfo_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_SourceCodeInfo * ret = google_protobuf_SourceCodeInfo_new ( arena ) ;
google_protobuf_SourceCodeInfo * ret = google_protobuf_SourceCodeInfo_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_SourceCodeInfo_serialize ( const google_protobuf_SourceCodeInfo * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_SourceCodeInfo_serialize ( const google_protobuf_SourceCodeInfo * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_SourceCodeInfo_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_SourceCodeInfo_msginit , arena , len ) ;
@ -3688,13 +3963,19 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeIn
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_SourceCodeInfo_Location * ret = google_protobuf_SourceCodeInfo_Location_new ( arena ) ;
google_protobuf_SourceCodeInfo_Location * ret = google_protobuf_SourceCodeInfo_Location_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_Location_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_Location_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_SourceCodeInfo_Location * ret = google_protobuf_SourceCodeInfo_Location_new ( arena ) ;
google_protobuf_SourceCodeInfo_Location * ret = google_protobuf_SourceCodeInfo_Location_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_Location_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_SourceCodeInfo_Location_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_SourceCodeInfo_Location_serialize ( const google_protobuf_SourceCodeInfo_Location * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_SourceCodeInfo_Location_serialize ( const google_protobuf_SourceCodeInfo_Location * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_SourceCodeInfo_Location_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_SourceCodeInfo_Location_msginit , arena , len ) ;
@ -3755,13 +4036,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_GeneratedCodeInfo * ret = google_protobuf_GeneratedCodeInfo_new ( arena ) ;
google_protobuf_GeneratedCodeInfo * ret = google_protobuf_GeneratedCodeInfo_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_GeneratedCodeInfo * ret = google_protobuf_GeneratedCodeInfo_new ( arena ) ;
google_protobuf_GeneratedCodeInfo * ret = google_protobuf_GeneratedCodeInfo_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_serialize ( const google_protobuf_GeneratedCodeInfo * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_serialize ( const google_protobuf_GeneratedCodeInfo * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_GeneratedCodeInfo_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_GeneratedCodeInfo_msginit , arena , len ) ;
@ -3792,13 +4079,19 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_Generat
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_parse ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_parse ( const char * buf , size_t size ,
upb_arena * arena ) {
upb_arena * arena ) {
google_protobuf_GeneratedCodeInfo_Annotation * ret = google_protobuf_GeneratedCodeInfo_Annotation_new ( arena ) ;
google_protobuf_GeneratedCodeInfo_Annotation * ret = google_protobuf_GeneratedCodeInfo_Annotation_new ( arena ) ;
return ( ret & & upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_Annotation_msginit , arena ) ) ? ret : NULL ;
if ( ! ret ) return NULL ;
if ( ! upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_Annotation_msginit , arena ) ) return NULL ;
return ret ;
}
}
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_parse_ex ( const char * buf , size_t size ,
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_parse_ex ( const char * buf , size_t size ,
upb_arena * arena , int options ) {
const upb_extreg * extreg , int options ,
upb_arena * arena ) {
google_protobuf_GeneratedCodeInfo_Annotation * ret = google_protobuf_GeneratedCodeInfo_Annotation_new ( arena ) ;
google_protobuf_GeneratedCodeInfo_Annotation * ret = google_protobuf_GeneratedCodeInfo_Annotation_new ( arena ) ;
return ( ret & & _upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_Annotation_msginit , arena , options ) )
if ( ! ret ) return NULL ;
? ret : NULL ;
if ( ! _upb_decode ( buf , size , ret , & google_protobuf_GeneratedCodeInfo_Annotation_msginit , extreg , options , arena ) ) {
return NULL ;
}
return ret ;
}
}
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_Annotation_serialize ( const google_protobuf_GeneratedCodeInfo_Annotation * msg , upb_arena * arena , size_t * len ) {
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_Annotation_serialize ( const google_protobuf_GeneratedCodeInfo_Annotation * msg , upb_arena * arena , size_t * len ) {
return upb_encode ( msg , & google_protobuf_GeneratedCodeInfo_Annotation_msginit , arena , len ) ;
return upb_encode ( msg , & google_protobuf_GeneratedCodeInfo_Annotation_msginit , arena , len ) ;