diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2018-12-08 09:54:09 +0100 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2018-12-08 09:54:09 +0100 |
commit | 14c96a143c63a01c1080a23d9e1c0196d06f0e5e (patch) | |
tree | f59388c3d84b175c335581a0f065e2c31d22834a /upb/upb.h | |
parent | e77ab811ba3e1ed069822cb5dccb4d643d3e56d3 (diff) | |
parent | 35fa3df8ecc3f451af0512e70a03f89ee407c85c (diff) |
Merge branch 'cmake-mac-fixes' into defcleanup
Diffstat (limited to 'upb/upb.h')
-rw-r--r-- | upb/upb.h | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -532,7 +532,7 @@ UPB_INLINE void *upb_arena_malloc(upb_arena *a, size_t size) { } UPB_INLINE void *upb_arena_realloc(upb_arena *a, void *ptr, size_t oldsize, size_t size) { - return upb_malloc(upb_arena_realloc(a), ptr, oldsize, size); + return upb_realloc(upb_arena_alloc(a), ptr, oldsize, size); } UPB_END_EXTERN_C @@ -804,6 +804,30 @@ typedef enum { UPB_SYNTAX_PROTO3 = 3 } upb_syntax_t; +/* All the different kind of well known type messages. For simplicity of check, + * number wrappers and string wrappers are grouped together. Make sure the + * order and merber of these groups are not changed. + */ +typedef enum { + UPB_WELLKNOWN_UNSPECIFIED, + UPB_WELLKNOWN_DURATION, + UPB_WELLKNOWN_TIMESTAMP, + /* number wrappers */ + UPB_WELLKNOWN_DOUBLEVALUE, + UPB_WELLKNOWN_FLOATVALUE, + UPB_WELLKNOWN_INT64VALUE, + UPB_WELLKNOWN_UINT64VALUE, + UPB_WELLKNOWN_INT32VALUE, + UPB_WELLKNOWN_UINT32VALUE, + /* string wrappers */ + UPB_WELLKNOWN_STRINGVALUE, + UPB_WELLKNOWN_BYTESVALUE, + UPB_WELLKNOWN_BOOLVALUE, + UPB_WELLKNOWN_VALUE, + UPB_WELLKNOWN_LISTVALUE, + UPB_WELLKNOWN_STRUCT +} upb_wellknowntype_t; + extern const uint8_t upb_desctype_to_fieldtype[]; #endif /* UPB_H_ */ |