Go to the documentation of this file.
3 #if UINTPTR_MAX == 0xffffffff
4 #define UPB_SIZE(size32, size64) size32
6 #define UPB_SIZE(size32, size64) size64
9 #define UPB_FIELD_AT(msg, fieldtype, offset) \
10 *(fieldtype*)((const char*)(msg) + offset)
12 #define UPB_READ_ONEOF(msg, fieldtype, offset, case_offset, case_val, default) \
13 UPB_FIELD_AT(msg, int, case_offset) == case_val \
14 ? UPB_FIELD_AT(msg, fieldtype, offset) \
17 #define UPB_WRITE_ONEOF(msg, fieldtype, offset, value, case_offset, case_val) \
18 UPB_FIELD_AT(msg, int, case_offset) = case_val; \
19 UPB_FIELD_AT(msg, fieldtype, offset) = value;
81 #ifndef UPB_REFCOUNTED_H_
82 #define UPB_REFCOUNTED_H_
130 template <
int N>
class InlinedArena;
131 template <
int N>
class InlinedEnvironment;
137 #define UPB_INLINE inline
138 #elif defined (__GNUC__)
139 #define UPB_INLINE static __inline__
141 #define UPB_INLINE static
145 #define UPB_LIKELY(x) __builtin_expect((x),1)
149 #if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
150 #define UPB_BIG_ENDIAN
155 #define UPB_FORCEINLINE __inline__ __attribute__((always_inline))
156 #define UPB_NOINLINE __attribute__((noinline))
157 #define UPB_NORETURN __attribute__((__noreturn__))
159 #define UPB_FORCEINLINE
164 #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
167 #define _upb_snprintf snprintf
168 #define _upb_vsnprintf vsnprintf
169 #define _upb_va_copy(a, b) va_copy(a, b)
170 #elif defined __GNUC__
176 #define _upb_snprintf __builtin_snprintf
177 #define _upb_vsnprintf __builtin_vsnprintf
178 #define _upb_va_copy(a, b) __va_copy(a, b)
180 #error Need implementations of [v]snprintf and va_copy
184 #if ((defined(__cplusplus) && __cplusplus >= 201103L) || \
185 defined(__GXX_EXPERIMENTAL_CXX0X__)) && !defined(UPB_NO_CXX11)
195 #include <type_traits>
196 #define UPB_DISALLOW_COPY_AND_ASSIGN(class_name) \
197 class_name(const class_name&) = delete; \
198 void operator=(const class_name&) = delete;
199 #define UPB_DISALLOW_POD_OPS(class_name, full_class_name) \
200 class_name() = delete; \
201 ~class_name() = delete; \
202 UPB_DISALLOW_COPY_AND_ASSIGN(class_name)
203 #define UPB_ASSERT_STDLAYOUT(type) \
204 static_assert(std::is_standard_layout<type>::value, \
205 #type " must be standard layout");
206 #define UPB_FINAL final
208 #define UPB_DISALLOW_COPY_AND_ASSIGN(class_name) \
209 class_name(const class_name&); \
210 void operator=(const class_name&);
211 #define UPB_DISALLOW_POD_OPS(class_name, full_class_name) \
214 UPB_DISALLOW_COPY_AND_ASSIGN(class_name)
215 #define UPB_ASSERT_STDLAYOUT(type)
232 #define UPB_C_UPCASTS(ty, base) \
233 UPB_INLINE base *ty ## _upcast_mutable(ty *p) { return (base*)p; } \
234 UPB_INLINE const base *ty ## _upcast(const ty *p) { return (const base*)p; }
236 #define UPB_C_UPCASTS2(ty, base, base2) \
237 UPB_C_UPCASTS(ty, base) \
238 UPB_INLINE base2 *ty ## _upcast2_mutable(ty *p) { return (base2*)p; } \
239 UPB_INLINE const base2 *ty ## _upcast2(const ty *p) { return (const base2*)p; }
243 #define UPB_BEGIN_EXTERN_C extern "C" {
244 #define UPB_END_EXTERN_C }
245 #define UPB_PRIVATE_FOR_CPP private:
246 #define UPB_DECLARE_TYPE(cppname, cname) typedef cppname cname;
248 #define UPB_DECLARE_DERIVED_TYPE(cppname, cppbase, cname, cbase) \
249 UPB_DECLARE_TYPE(cppname, cname) \
250 UPB_C_UPCASTS(cname, cbase) \
253 class Pointer<cppname> : public PointerBase<cppname, cppbase> { \
255 explicit Pointer(cppname* ptr) \
256 : PointerBase<cppname, cppbase>(ptr) {} \
259 class Pointer<const cppname> \
260 : public PointerBase<const cppname, const cppbase> { \
262 explicit Pointer(const cppname* ptr) \
263 : PointerBase<const cppname, const cppbase>(ptr) {} \
267 #define UPB_DECLARE_DERIVED_TYPE2(cppname, cppbase, cppbase2, cname, cbase, \
269 UPB_DECLARE_TYPE(cppname, cname) \
270 UPB_C_UPCASTS2(cname, cbase, cbase2) \
273 class Pointer<cppname> : public PointerBase2<cppname, cppbase, cppbase2> { \
275 explicit Pointer(cppname* ptr) \
276 : PointerBase2<cppname, cppbase, cppbase2>(ptr) {} \
279 class Pointer<const cppname> \
280 : public PointerBase2<const cppname, const cppbase, const cppbase2> { \
282 explicit Pointer(const cppname* ptr) \
283 : PointerBase2<const cppname, const cppbase, const cppbase2>(ptr) {} \
289 #define UPB_BEGIN_EXTERN_C
290 #define UPB_END_EXTERN_C
291 #define UPB_PRIVATE_FOR_CPP
292 #define UPB_DECLARE_TYPE(cppname, cname) \
294 typedef struct cname cname;
295 #define UPB_DECLARE_DERIVED_TYPE(cppname, cppbase, cname, cbase) \
296 UPB_DECLARE_TYPE(cppname, cname) \
297 UPB_C_UPCASTS(cname, cbase)
298 #define UPB_DECLARE_DERIVED_TYPE2(cppname, cppbase, cppbase2, \
299 cname, cbase, cbase2) \
300 UPB_DECLARE_TYPE(cppname, cname) \
301 UPB_C_UPCASTS2(cname, cbase, cbase2)
305 #define UPB_MAX(x, y) ((x) > (y) ? (x) : (y))
306 #define UPB_MIN(x, y) ((x) < (y) ? (x) : (y))
308 #define UPB_UNUSED(var) (void)var
313 #define UPB_ASSERT(expr) do {} while (false && (expr))
315 #define UPB_ASSERT(expr) assert(expr)
320 #define UPB_ASSERT_DEBUGVAR(expr) assert(expr)
323 #define UPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0)
325 #define UPB_UNREACHABLE() do { assert(0); } while(0)
338 template <
class T>
class Pointer;
350 template<
class To,
class From> To
down_cast(From*
f);
362 template<
class To,
class From> To dyn_cast(From*
f);
371 template <
class T>
inline Pointer<T> upcast(
T *
f) {
return Pointer<T>(
f); }
379 template <
class T,
class F>
inline T* upcast_to(
F *
f) {
380 return static_cast<T*
>(upcast(
f));
386 template <
class T,
class Base>
389 explicit PointerBase(
T* ptr) : ptr_(ptr) {}
390 operator T*() {
return ptr_; }
391 operator Base*() {
return (Base*)ptr_; }
397 template <
class T,
class Base,
class Base2>
398 class PointerBase2 :
public PointerBase<T, Base> {
400 explicit PointerBase2(
T* ptr) : PointerBase<
T, Base>(ptr) {}
401 operator Base2*() {
return Pointer<Base>(*
this); }
433 class upb::ErrorSpace {
449 #define UPB_STATUS_MAX_MESSAGE 128
476 bool ok()
const {
return upb_ok(
this); }
489 void SetFormattedErrorMessage(
const char*
fmt, ...) {
518 #define UPB_STATUS_INIT {true, 0, NULL, {0}}
578 return alloc->
func(alloc, ptr, oldsize,
size);
583 alloc->
func(alloc, ptr, 0, 0);
624 #define UPB_ARENA_BLOCK_OVERHEAD (sizeof(size_t)*4)
652 Arena(
void *mem,
size_t len, Allocator*
a) {
683 size_t BytesAllocated()
const {
701 size_t bytes_allocated;
702 size_t next_block_size;
703 size_t max_block_size;
763 class upb::Environment {
768 Environment(
void *mem,
size_t len, Allocator *
a) :
arena_(mem,
len,
a) {
790 bool ReportError(
const Status* status) {
818 template <
int N>
class upb::InlinedArena :
public upb::Arena {
820 InlinedArena() : Arena(initial_block_, N,
NULL) {}
821 explicit InlinedArena(Allocator*
a) : Arena(initial_block_, N,
a) {}
829 template <
int N>
class upb::InlinedEnvironment :
public upb::Environment {
831 InlinedEnvironment() : Environment(initial_block_, N,
NULL) {}
832 explicit InlinedEnvironment(Allocator *
a)
833 : Environment(initial_block_, N,
a) {}
881 #define SET_TYPE(dest, val) UPB_UNUSED(val)
883 #define SET_TYPE(dest, val) dest = val
916 #define FUNCS(name, membername, type_t, converter, proto_type) \
917 UPB_INLINE void upb_value_set ## name(upb_value *val, type_t cval) { \
918 val->val = (converter)cval; \
919 SET_TYPE(val->ctype, proto_type); \
921 UPB_INLINE upb_value upb_value_ ## name(type_t val) { \
923 upb_value_set ## name(&ret, val); \
926 UPB_INLINE type_t upb_value_get ## name(upb_value val) { \
927 UPB_ASSERT_DEBUGVAR(val.ctype == proto_type); \
928 return (type_t)(converter)val.val; \
944 memcpy(&
val->val, &cval,
sizeof(cval));
949 memcpy(&
val->val, &cval,
sizeof(cval));
979 #define UPB_TABKEY_NUM(n) n
980 #define UPB_TABKEY_NONE 0
986 #ifdef UPB_BIG_ENDIAN
987 #define UPB_TABKEY_STR(len1, len2, len3, len4, strval) \
988 (uintptr_t)(len4 len3 len2 len1 strval)
990 #define UPB_TABKEY_STR(len1, len2, len3, len4, strval) \
991 (uintptr_t)(len1 len2 len3 len4 strval)
995 char* mem = (
char*)
key;
997 return mem +
sizeof(*len);
1019 #if UINTPTR_MAX == 0xffffffffffffffffULL
1020 #define UPB_PTR_IS_64BITS
1021 #elif UINTPTR_MAX != 0xffffffff
1022 #error Could not determine how many bits pointers are.
1032 #ifdef UPB_PTR_IS_64BITS
1044 #ifdef UPB_PTR_IS_64BITS
1045 #define UPB_TABVALUE_INT_INIT(v) {{v}}
1046 #define UPB_TABVALUE_EMPTY_INIT {{-1}}
1051 #ifdef UPB_BIG_ENDIAN
1052 #define UPB_TABVALUE_INT_INIT(v) {{0, v}}
1053 #define UPB_TABVALUE_EMPTY_INIT {{-1, -1}}
1055 #define UPB_TABVALUE_INT_INIT(v) {{v, 0}}
1056 #define UPB_TABVALUE_EMPTY_INIT {{-1, -1}}
1061 #define UPB_TABVALUE_PTR_INIT(v) UPB_TABVALUE_INT_INIT((uintptr_t)v)
1063 #undef UPB_PTR_IS_64BITS
1108 # define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
1109 {count, mask, ctype, size_lg2, entries}
1111 # ifdef UPB_DEBUG_REFS
1114 # define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
1115 {count, mask, ctype, size_lg2, entries, &upb_alloc_debugrefs}
1117 # define UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries) \
1118 {count, mask, ctype, size_lg2, entries, NULL}
1126 #define UPB_STRTABLE_INIT(count, mask, ctype, size_lg2, entries) \
1127 {UPB_TABLE_INIT(count, mask, ctype, size_lg2, entries)}
1129 #define UPB_EMPTY_STRTABLE_INIT(ctype) \
1130 UPB_STRTABLE_INIT(0, 0, ctype, 0, NULL)
1139 #define UPB_INTTABLE_INIT(count, mask, ctype, size_lg2, ent, a, asize, acount) \
1140 {UPB_TABLE_INIT(count, mask, ctype, size_lg2, ent), a, asize, acount}
1142 #define UPB_EMPTY_INTTABLE_INIT(ctype) \
1143 UPB_INTTABLE_INIT(0, 0, ctype, 0, NULL, NULL, 0, 0)
1145 #define UPB_ARRAY_EMPTYENT -1
1167 return (uint32_t)
key;
1175 return key.val != (uint64_t)-1;
1310 *
v = upb_value_int32(0);
1311 if (key < t->array_size) {
1323 if ((uint32_t)e->
key ==
key) {
1434 template <
class T>
class reffed_ptr;
1444 class upb::RefCounted {
1447 bool IsFrozen()
const;
1453 void Ref(
const void *owner)
const;
1457 void Unref(
const void *owner)
const;
1462 void DonateRef(
const void *from,
const void *to)
const;
1466 void CheckRef(
const void *owner)
const;
1496 #ifdef UPB_DEBUG_REFS
1502 #ifdef UPB_DEBUG_REFS
1504 #define UPB_REFCOUNT_INIT(vtbl, refs, ref2s) \
1505 {&static_refcount, NULL, vtbl, 0, true, refs, ref2s}
1507 #define UPB_REFCOUNT_INIT(vtbl, refs, ref2s) \
1508 {&static_refcount, NULL, vtbl, 0, true}
1527 #define UPB_REFCOUNTED_CMETHODS(type, upcastfunc) \
1528 UPB_INLINE bool type ## _isfrozen(const type *v) { \
1529 return upb_refcounted_isfrozen(upcastfunc(v)); \
1531 UPB_INLINE void type ## _ref(const type *v, const void *owner) { \
1532 upb_refcounted_ref(upcastfunc(v), owner); \
1534 UPB_INLINE void type ## _unref(const type *v, const void *owner) { \
1535 upb_refcounted_unref(upcastfunc(v), owner); \
1537 UPB_INLINE void type ## _donateref(const type *v, const void *from, const void *to) { \
1538 upb_refcounted_donateref(upcastfunc(v), from, to); \
1540 UPB_INLINE void type ## _checkref(const type *v, const void *owner) { \
1541 upb_refcounted_checkref(upcastfunc(v), owner); \
1544 #define UPB_REFCOUNTED_CPPMETHODS \
1545 bool IsFrozen() const { \
1546 return upb::upcast_to<const upb::RefCounted>(this)->IsFrozen(); \
1548 void Ref(const void *owner) const { \
1549 return upb::upcast_to<const upb::RefCounted>(this)->Ref(owner); \
1551 void Unref(const void *owner) const { \
1552 return upb::upcast_to<const upb::RefCounted>(this)->Unref(owner); \
1554 void DonateRef(const void *from, const void *to) const { \
1555 return upb::upcast_to<const upb::RefCounted>(this)->DonateRef(from, to); \
1557 void CheckRef(const void *owner) const { \
1558 return upb::upcast_to<const upb::RefCounted>(this)->CheckRef(owner); \
1593 #define upb_ref2(r, from) \
1594 upb_refcounted_ref2((const upb_refcounted*)r, (upb_refcounted*)from)
1595 #define upb_unref2(r, from) \
1596 upb_refcounted_unref2((const upb_refcounted*)r, (upb_refcounted*)from)
1623 inline bool RefCounted::IsFrozen()
const {
1626 inline void RefCounted::Ref(
const void *owner)
const {
1629 inline void RefCounted::Unref(
const void *owner)
const {
1632 inline void RefCounted::DonateRef(
const void *from,
const void *to)
const {
1635 inline void RefCounted::CheckRef(
const void *owner)
const {
1646 #include <algorithm>
1650 template <
class T>
class upb::reffed_ptr {
1652 reffed_ptr() : ptr_(
NULL) {}
1656 reffed_ptr(U*
val,
const void* ref_donor =
NULL)
1657 : ptr_(
upb::upcast(
val)) {
1660 ptr_->DonateRef(ref_donor,
this);
1667 reffed_ptr(
const reffed_ptr<U>& other)
1668 : ptr_(
upb::upcast(other.
get())) {
1669 if (ptr_) ptr_->Ref(
this);
1672 reffed_ptr(
const reffed_ptr& other)
1673 : ptr_(
upb::upcast(other.
get())) {
1674 if (ptr_) ptr_->Ref(
this);
1677 ~reffed_ptr() {
if (ptr_) ptr_->Unref(
this); }
1680 reffed_ptr& operator=(
const reffed_ptr<U>& other) {
1685 reffed_ptr& operator=(
const reffed_ptr& other) {
1693 void swap(reffed_ptr& other) {
1694 if (ptr_ == other.ptr_) {
1698 if (ptr_) ptr_->DonateRef(
this, &other);
1699 if (other.ptr_) other.ptr_->DonateRef(&other,
this);
1708 T* operator->()
const {
1713 T*
get()
const {
return ptr_; }
1717 void reset(U* ptr =
NULL,
const void* ref_donor =
NULL) {
1718 reffed_ptr(ptr, ref_donor).swap(*
this);
1723 return reffed_ptr<U>(upb::down_cast<U*>(
get()));
1727 reffed_ptr<U> dyn_cast() {
1728 return reffed_ptr<U>(upb::dyn_cast<U*>(
get()));
1733 T* ReleaseTo(
const void* new_owner) {
1735 ptr_->DonateRef(
this, new_owner);
1779 #define UPB_MAX_MESSAGE_DEPTH 64
1807 Type def_type()
const;
1810 const char *full_name()
const;
1813 const char *
name()
const;
1819 bool set_full_name(
const char* fullname,
upb::Status* s);
1825 FileDef* file()
const;
1838 static bool Freeze(Def*
const* defs,
size_t n,
Status* status);
1839 static bool Freeze(
const std::vector<Def*>& defs,
Status* status);
1859 #define UPB_DEF_INIT(name, type, vtbl, refs, ref2s) \
1860 { UPB_REFCOUNT_INIT(vtbl, refs, ref2s), name, NULL, type, false }
1883 #define UPB_CPP_CASTS(cname, cpptype) \
1886 inline cpptype *down_cast<cpptype *, Def>(Def * def) { \
1887 return upb_downcast_##cname##_mutable(def); \
1890 inline cpptype *dyn_cast<cpptype *, Def>(Def * def) { \
1891 return upb_dyncast_##cname##_mutable(def); \
1894 inline const cpptype *down_cast<const cpptype *, const Def>( \
1896 return upb_downcast_##cname(def); \
1899 inline const cpptype *dyn_cast<const cpptype *, const Def>(const Def *def) { \
1900 return upb_dyncast_##cname(def); \
1903 inline const cpptype *down_cast<const cpptype *, Def>(Def * def) { \
1904 return upb_downcast_##cname(def); \
1907 inline const cpptype *dyn_cast<const cpptype *, Def>(Def * def) { \
1908 return upb_dyncast_##cname(def); \
1912 #define UPB_CPP_CASTS(cname, cpptype)
1918 #define UPB_DEF_CASTS(lower, upper, cpptype) \
1919 UPB_INLINE const upb_##lower *upb_dyncast_##lower(const upb_def *def) { \
1920 if (upb_def_type(def) != UPB_DEF_##upper) return NULL; \
1921 return (upb_##lower *)def; \
1923 UPB_INLINE const upb_##lower *upb_downcast_##lower(const upb_def *def) { \
1924 UPB_ASSERT(upb_def_type(def) == UPB_DEF_##upper); \
1925 return (const upb_##lower *)def; \
1927 UPB_INLINE upb_##lower *upb_dyncast_##lower##_mutable(upb_def *def) { \
1928 return (upb_##lower *)upb_dyncast_##lower(def); \
1930 UPB_INLINE upb_##lower *upb_downcast_##lower##_mutable(upb_def *def) { \
1931 return (upb_##lower *)upb_downcast_##lower(def); \
1933 UPB_CPP_CASTS(lower, cpptype)
1935 #define UPB_DEFINE_DEF(cppname, lower, upper, cppmethods, members) \
1936 UPB_DEFINE_CLASS2(cppname, upb::Def, upb::RefCounted, cppmethods, \
1938 UPB_DEF_CASTS(lower, upper, cppname)
1940 #define UPB_DECLARE_DEF_TYPE(cppname, lower, upper) \
1941 UPB_DECLARE_DERIVED_TYPE2(cppname, upb::Def, upb::RefCounted, \
1942 upb_ ## lower, upb_def, upb_refcounted) \
1943 UPB_DEF_CASTS(lower, upper, cppname)
1949 #undef UPB_DECLARE_DEF_TYPE
1950 #undef UPB_DEF_CASTS
1951 #undef UPB_CPP_CASTS
2051 #define UPB_MAX_FIELDNUMBER ((1 << 29) - 1)
2060 class upb::FieldDef {
2068 static bool CheckType(int32_t
val);
2069 static bool CheckLabel(int32_t
val);
2070 static bool CheckDescriptorType(int32_t
val);
2071 static bool CheckIntegerFormat(int32_t
val);
2075 static Type ConvertType(int32_t
val);
2076 static Label ConvertLabel(int32_t
val);
2077 static DescriptorType ConvertDescriptorType(int32_t
val);
2078 static IntegerFormat ConvertIntegerFormat(int32_t
val);
2081 static reffed_ptr<FieldDef>
New();
2087 const char* full_name()
const;
2089 bool type_is_set()
const;
2091 Label
label()
const;
2092 const char*
name()
const;
2094 bool is_extension()
const;
2114 return str->size() > 0;
2131 bool packed()
const;
2137 uint32_t
index()
const;
2147 const MessageDef* containing_type()
const;
2148 const char* containing_type_name();
2152 const OneofDef* containing_oneof()
const;
2163 bool IsSubMessage()
const;
2164 bool IsString()
const;
2165 bool IsSequence()
const;
2166 bool IsPrimitive()
const;
2173 bool HasPresence()
const;
2177 IntegerFormat integer_format()
const;
2181 bool is_tag_delimited()
const;
2189 int64_t default_int64()
const;
2190 int32_t default_int32()
const;
2191 uint64_t default_uint64()
const;
2192 uint32_t default_uint32()
const;
2193 bool default_bool()
const;
2194 float default_float()
const;
2195 double default_double()
const;
2199 const char *default_string(
size_t*
len)
const;
2213 bool EnumHasStringDefault()
const;
2214 bool EnumHasInt32Default()
const;
2220 bool HasSubDef()
const;
2226 const EnumDef* enum_subdef()
const;
2227 const MessageDef* message_subdef()
const;
2231 const Def* subdef()
const;
2236 const char* subdef_name()
const;
2240 bool set_full_name(
const char* fullname,
upb::Status*
s);
2245 bool set_containing_type_name(
const char *
name,
Status* status);
2251 void set_lazy(
bool lazy);
2254 void set_packed(
bool packed);
2261 void set_label(Label
label);
2262 void set_descriptor_type(DescriptorType
type);
2263 void set_is_extension(
bool is_extension);
2279 bool set_json_name(
const char* json_name,
upb::Status*
s);
2284 void clear_json_name();
2286 void set_integer_format(IntegerFormat
format);
2287 bool set_tag_delimited(
bool tag_delimited,
upb::Status*
s);
2295 void set_default_int64(int64_t
val);
2296 void set_default_int32(int32_t
val);
2297 void set_default_uint64(uint64_t
val);
2298 void set_default_uint32(uint32_t
val);
2299 void set_default_bool(
bool val);
2300 void set_default_float(
float val);
2301 void set_default_double(
double val);
2302 bool set_default_string(
const void *
str,
size_t len,
Status *
s);
2304 void set_default_cstr(
const char *
str,
Status *
s);
2315 bool set_subdef(
const Def* subdef,
Status*
s);
2316 bool set_enum_subdef(
const EnumDef* subdef,
Status*
s);
2317 bool set_message_subdef(
const MessageDef* subdef,
Status*
s);
2318 bool set_subdef_name(
const char*
name,
Status*
s);
2355 uint32_t selector_base;
2364 #define UPB_FIELDDEF_INIT(label, type, intfmt, tagdelim, is_extension, lazy, \
2365 packed, name, num, msgdef, subdef, selector_base, \
2366 index, defaultval, refs, ref2s) \
2368 UPB_DEF_INIT(name, UPB_DEF_FIELD, &upb_fielddef_vtbl, refs, ref2s), \
2369 defaultval, {msgdef}, {subdef}, NULL, false, false, \
2370 type == UPB_TYPE_STRING || type == UPB_TYPE_BYTES, true, is_extension, \
2371 lazy, packed, intfmt, tagdelim, type, label, num, selector_base, index \
2472 #define UPB_MAPENTRY_KEY 1
2473 #define UPB_MAPENTRY_VALUE 2
2476 #define UPB_ANY_TYPE 1
2477 #define UPB_ANY_VALUE 2
2480 #define UPB_DURATION_SECONDS 1
2481 #define UPB_DURATION_NANOS 2
2484 #define UPB_TIMESTAMP_SECONDS 1
2485 #define UPB_TIMESTAMP_NANOS 2
2492 class upb::MessageDef {
2495 static reffed_ptr<MessageDef>
New();
2501 const char* full_name()
const;
2502 const char*
name()
const;
2503 bool set_full_name(
const char* fullname,
Status*
s);
2512 int field_count()
const;
2515 int oneof_count()
const;
2542 bool AddOneof(OneofDef* o,
Status*
s);
2543 bool AddOneof(
const reffed_ptr<OneofDef>& o,
Status*
s);
2553 void SetPrimitivesHavePresence(
bool have_presence);
2556 FieldDef* FindFieldByNumber(uint32_t
number);
2558 const FieldDef* FindFieldByNumber(uint32_t
number)
const;
2598 void setmapentry(
bool map_entry);
2599 bool mapentry()
const;
2606 bool isnumberwrapper()
const;
2609 class field_iterator
2610 :
public std::iterator<std::forward_iterator_tag, FieldDef*> {
2612 explicit field_iterator(MessageDef* md);
2613 static field_iterator
end(MessageDef* md);
2617 bool operator!=(
const field_iterator& other)
const;
2618 bool operator==(
const field_iterator& other)
const;
2624 class const_field_iterator
2625 :
public std::iterator<std::forward_iterator_tag, const FieldDef*> {
2627 explicit const_field_iterator(
const MessageDef* md);
2628 static const_field_iterator
end(
const MessageDef* md);
2632 bool operator!=(
const const_field_iterator& other)
const;
2633 bool operator==(
const const_field_iterator& other)
const;
2640 class oneof_iterator
2641 :
public std::iterator<std::forward_iterator_tag, FieldDef*> {
2643 explicit oneof_iterator(MessageDef* md);
2644 static oneof_iterator
end(MessageDef* md);
2648 bool operator!=(
const oneof_iterator& other)
const;
2649 bool operator==(
const oneof_iterator& other)
const;
2655 class const_oneof_iterator
2656 :
public std::iterator<std::forward_iterator_tag, const FieldDef*> {
2658 explicit const_oneof_iterator(
const MessageDef* md);
2659 static const_oneof_iterator
end(
const MessageDef* md);
2663 bool operator!=(
const const_oneof_iterator& other)
const;
2664 bool operator==(
const const_oneof_iterator& other)
const;
2670 class FieldAccessor {
2672 explicit FieldAccessor(MessageDef* msg) : msg_(msg) {}
2673 field_iterator
begin() {
return msg_->field_begin(); }
2674 field_iterator
end() {
return msg_->field_end(); }
2679 class ConstFieldAccessor {
2681 explicit ConstFieldAccessor(
const MessageDef* msg) : msg_(msg) {}
2682 const_field_iterator
begin() {
return msg_->field_begin(); }
2683 const_field_iterator
end() {
return msg_->field_end(); }
2685 const MessageDef* msg_;
2688 class OneofAccessor {
2690 explicit OneofAccessor(MessageDef* msg) : msg_(msg) {}
2691 oneof_iterator
begin() {
return msg_->oneof_begin(); }
2692 oneof_iterator
end() {
return msg_->oneof_end(); }
2697 class ConstOneofAccessor {
2699 explicit ConstOneofAccessor(
const MessageDef* msg) : msg_(msg) {}
2700 const_oneof_iterator
begin() {
return msg_->oneof_begin(); }
2701 const_oneof_iterator
end() {
return msg_->oneof_end(); }
2703 const MessageDef* msg_;
2706 field_iterator field_begin();
2707 field_iterator field_end();
2708 const_field_iterator field_begin()
const;
2709 const_field_iterator field_end()
const;
2711 oneof_iterator oneof_begin();
2712 oneof_iterator oneof_end();
2713 const_oneof_iterator oneof_begin()
const;
2714 const_oneof_iterator oneof_end()
const;
2716 FieldAccessor
fields() {
return FieldAccessor(
this); }
2717 ConstFieldAccessor
fields()
const {
return ConstFieldAccessor(
this); }
2718 OneofAccessor oneofs() {
return OneofAccessor(
this); }
2719 ConstOneofAccessor oneofs()
const {
return ConstOneofAccessor(
this); }
2728 uint32_t submsg_field_count;
2754 #define UPB_MSGDEF_INIT(name, selector_count, submsg_field_count, itof, ntof, \
2755 map_entry, syntax, well_known_type, refs, ref2s) \
2757 UPB_DEF_INIT(name, UPB_DEF_MSG, &upb_fielddef_vtbl, refs, ref2s), \
2758 selector_count, submsg_field_count, itof, ntof, map_entry, syntax, \
2805 const char *
name,
size_t len) {
2822 const char *
name,
size_t len) {
2876 class upb::EnumDef {
2879 static reffed_ptr<EnumDef>
New();
2885 const char* full_name()
const;
2886 const char*
name()
const;
2887 bool set_full_name(
const char* fullname,
Status*
s);
2901 bool set_default_value(int32_t
val,
Status* status);
2906 int value_count()
const;
2910 bool AddValue(
const char*
name, int32_t num,
Status* status);
2914 bool FindValueByName(
const char*
name, int32_t* num)
const;
2919 const char* FindValueByNumber(int32_t num)
const;
2927 explicit Iterator(
const EnumDef*);
2954 #define UPB_ENUMDEF_INIT(name, ntoi, iton, defaultval, refs, ref2s) \
2955 { UPB_DEF_INIT(name, UPB_DEF_ENUM, &upb_enumdef_vtbl, refs, ref2s), ntoi, \
2986 const char *
name, int32_t *num) {
3012 class upb::OneofDef {
3015 static reffed_ptr<OneofDef>
New();
3021 const MessageDef* containing_type()
const;
3025 const char*
name()
const;
3030 int field_count()
const;
3067 const FieldDef* FindFieldByNumber(uint32_t num)
const;
3070 class iterator :
public std::iterator<std::forward_iterator_tag, FieldDef*> {
3072 explicit iterator(OneofDef* md);
3073 static iterator
end(OneofDef* md);
3077 bool operator!=(
const iterator& other)
const;
3078 bool operator==(
const iterator& other)
const;
3084 class const_iterator
3085 :
public std::iterator<std::forward_iterator_tag, const FieldDef*> {
3087 explicit const_iterator(
const OneofDef* md);
3088 static const_iterator
end(
const OneofDef* md);
3092 bool operator!=(
const const_iterator& other)
const;
3093 bool operator==(
const const_iterator& other)
const;
3101 const_iterator
begin()
const;
3102 const_iterator
end()
const;
3122 #define UPB_ONEOFDEF_INIT(name, ntof, itof, refs, ref2s) \
3123 { UPB_REFCOUNT_INIT(&upb_oneofdef_vtbl, refs, ref2s), 0, name, ntof, itof }
3138 const void *ref_donor,
3175 class upb::FileDef {
3178 static reffed_ptr<FileDef>
New();
3184 const char*
name()
const;
3190 bool set_package(
const char* package,
Status* s);
3194 const char* phpprefix()
const;
3195 bool set_phpprefix(
const char* phpprefix,
Status* s);
3200 const char* phpnamespace()
const;
3201 bool set_phpnamespace(
const char* phpnamespace,
Status* s);
3209 int def_count()
const;
3210 const Def* def(
int index)
const;
3211 Def* def(
int index);
3215 int dependency_count()
const;
3216 const FileDef* dependency(
int index)
const;
3225 bool AddDef(Def* def,
Status* s);
3231 bool AddDependency(
const FileDef* file);
3249 const char *phpprefix;
3250 const char *phpnamespace;
3319 class upb::SymbolTable {
3323 static SymbolTable*
New();
3324 static void Free(upb::SymbolTable*
table);
3350 const Def* Resolve(
const char*
base,
const char* sym)
const;
3354 const Def* Lookup(
const char *sym)
const;
3355 const MessageDef* LookupMessage(
const char *sym)
const;
3356 const EnumDef* LookupEnum(
const char *sym)
const;
3378 bool Add(Def*
const* defs,
size_t n,
void* ref_donor,
Status* status);
3380 bool Add(
const std::vector<Def*>& defs,
void *owner,
Status* status) {
3381 return Add((Def*
const*)&defs[0], defs.size(), owner, status);
3440 inline void SymbolTable::Free(SymbolTable* s) {
3443 inline const Def *SymbolTable::Resolve(
const char *
base,
3444 const char *sym)
const {
3447 inline const Def* SymbolTable::Lookup(
const char *sym)
const {
3450 inline const MessageDef *SymbolTable::LookupMessage(
const char *sym)
const {
3454 Def*
const* defs,
size_t n,
void* ref_donor,
Status* status) {
3474 inline const char* Def::full_name()
const {
return upb_def_fullname(
this); }
3476 inline bool Def::set_full_name(
const char* fullname,
Status* s) {
3482 inline bool Def::Freeze(Def*
const* defs,
size_t n,
Status* status) {
3485 inline bool Def::Freeze(
const std::vector<Def*>& defs,
Status* status) {
3486 return upb_def_freeze((Def*
const*)&defs[0], defs.size(), status);
3489 inline bool FieldDef::CheckType(int32_t
val) {
3492 inline bool FieldDef::CheckLabel(int32_t
val) {
3495 inline bool FieldDef::CheckDescriptorType(int32_t
val) {
3498 inline bool FieldDef::CheckIntegerFormat(int32_t
val) {
3505 inline FieldDef::Label FieldDef::ConvertLabel(int32_t
val) {
3507 return static_cast<FieldDef::Label
>(
val);
3509 inline FieldDef::DescriptorType FieldDef::ConvertDescriptorType(int32_t
val) {
3511 return static_cast<FieldDef::DescriptorType
>(
val);
3513 inline FieldDef::IntegerFormat FieldDef::ConvertIntegerFormat(int32_t
val) {
3515 return static_cast<FieldDef::IntegerFormat
>(
val);
3520 return reffed_ptr<FieldDef>(
f, &
f);
3522 inline const char* FieldDef::full_name()
const {
3525 inline bool FieldDef::set_full_name(
const char* fullname,
Status* s) {
3531 inline bool FieldDef::type_is_set()
const {
3543 inline bool FieldDef::is_extension()
const {
3549 inline bool FieldDef::lazy()
const {
3552 inline void FieldDef::set_lazy(
bool lazy) {
3555 inline bool FieldDef::packed()
const {
3561 inline void FieldDef::set_packed(
bool packed) {
3564 inline const MessageDef* FieldDef::containing_type()
const {
3567 inline const OneofDef* FieldDef::containing_oneof()
const {
3570 inline const char* FieldDef::containing_type_name() {
3573 inline bool FieldDef::set_number(uint32_t
number,
Status* s) {
3576 inline bool FieldDef::set_name(
const char *
name,
Status* s) {
3582 inline bool FieldDef::set_json_name(
const char *
name,
Status* s) {
3588 inline void FieldDef::clear_json_name() {
3591 inline bool FieldDef::set_containing_type_name(
const char *
name,
Status* s) {
3594 inline bool FieldDef::set_containing_type_name(
const std::string &
name,
3601 inline void FieldDef::set_is_extension(
bool is_extension) {
3604 inline void FieldDef::set_descriptor_type(FieldDef::DescriptorType
type) {
3610 inline bool FieldDef::IsSubMessage()
const {
3616 inline int64_t FieldDef::default_int64()
const {
3619 inline int32_t FieldDef::default_int32()
const {
3622 inline uint64_t FieldDef::default_uint64()
const {
3625 inline uint32_t FieldDef::default_uint32()
const {
3628 inline bool FieldDef::default_bool()
const {
3631 inline float FieldDef::default_float()
const {
3634 inline double FieldDef::default_double()
const {
3637 inline const char* FieldDef::default_string(
size_t*
len)
const {
3640 inline void FieldDef::set_default_int64(int64_t
value) {
3643 inline void FieldDef::set_default_int32(int32_t
value) {
3646 inline void FieldDef::set_default_uint64(uint64_t
value) {
3649 inline void FieldDef::set_default_uint32(uint32_t
value) {
3652 inline void FieldDef::set_default_bool(
bool value) {
3655 inline void FieldDef::set_default_float(
float value) {
3658 inline void FieldDef::set_default_double(
double value) {
3661 inline bool FieldDef::set_default_string(
const void *
str,
size_t len,
3668 inline void FieldDef::set_default_cstr(
const char*
str,
Status* s) {
3673 inline const MessageDef *FieldDef::message_subdef()
const {
3676 inline const EnumDef *FieldDef::enum_subdef()
const {
3679 inline const char* FieldDef::subdef_name()
const {
3682 inline bool FieldDef::set_subdef(
const Def* subdef,
Status* s) {
3685 inline bool FieldDef::set_enum_subdef(
const EnumDef* subdef,
Status* s) {
3688 inline bool FieldDef::set_message_subdef(
const MessageDef* subdef,
Status* s) {
3691 inline bool FieldDef::set_subdef_name(
const char*
name,
Status* s) {
3700 return reffed_ptr<MessageDef>(
m, &
m);
3702 inline const char *MessageDef::full_name()
const {
3711 inline bool MessageDef::set_full_name(
const char* fullname,
Status* s) {
3717 inline bool MessageDef::set_syntax(
upb_syntax_t syntax) {
3720 inline bool MessageDef::Freeze(
Status* status) {
3723 inline int MessageDef::field_count()
const {
3726 inline int MessageDef::oneof_count()
const {
3738 inline bool MessageDef::AddOneof(
const reffed_ptr<OneofDef>& o,
Status* s) {
3741 inline FieldDef* MessageDef::FindFieldByNumber(uint32_t
number) {
3747 inline const FieldDef* MessageDef::FindFieldByNumber(uint32_t
number)
const {
3761 inline void MessageDef::setmapentry(
bool map_entry) {
3764 inline bool MessageDef::mapentry()
const {
3770 inline bool MessageDef::isnumberwrapper()
const {
3773 inline MessageDef::field_iterator MessageDef::field_begin() {
3774 return field_iterator(
this);
3776 inline MessageDef::field_iterator MessageDef::field_end() {
3779 inline MessageDef::const_field_iterator MessageDef::field_begin()
const {
3780 return const_field_iterator(
this);
3782 inline MessageDef::const_field_iterator MessageDef::field_end()
const {
3786 inline MessageDef::oneof_iterator MessageDef::oneof_begin() {
3787 return oneof_iterator(
this);
3789 inline MessageDef::oneof_iterator MessageDef::oneof_end() {
3792 inline MessageDef::const_oneof_iterator MessageDef::oneof_begin()
const {
3793 return const_oneof_iterator(
this);
3795 inline MessageDef::const_oneof_iterator MessageDef::oneof_end()
const {
3799 inline MessageDef::field_iterator::field_iterator(MessageDef* md) {
3804 MessageDef::field_iterator iter(md);
3811 inline void MessageDef::field_iterator::operator++() {
3814 inline bool MessageDef::field_iterator::operator==(
3815 const field_iterator &other)
const {
3819 const field_iterator &other)
const {
3820 return !(*
this == other);
3823 inline MessageDef::const_field_iterator::const_field_iterator(
3824 const MessageDef* md) {
3828 const MessageDef *md) {
3829 MessageDef::const_field_iterator iter(md);
3836 inline void MessageDef::const_field_iterator::operator++() {
3839 inline bool MessageDef::const_field_iterator::operator==(
3840 const const_field_iterator &other)
const {
3844 const const_field_iterator &other)
const {
3845 return !(*
this == other);
3848 inline MessageDef::oneof_iterator::oneof_iterator(MessageDef* md) {
3853 MessageDef::oneof_iterator iter(md);
3860 inline void MessageDef::oneof_iterator::operator++() {
3863 inline bool MessageDef::oneof_iterator::operator==(
3864 const oneof_iterator &other)
const {
3868 const oneof_iterator &other)
const {
3869 return !(*
this == other);
3872 inline MessageDef::const_oneof_iterator::const_oneof_iterator(
3873 const MessageDef* md) {
3877 const MessageDef *md) {
3878 MessageDef::const_oneof_iterator iter(md);
3885 inline void MessageDef::const_oneof_iterator::operator++() {
3888 inline bool MessageDef::const_oneof_iterator::operator==(
3889 const const_oneof_iterator &other)
const {
3893 const const_oneof_iterator &other)
const {
3894 return !(*
this == other);
3899 return reffed_ptr<EnumDef>(e, &e);
3901 inline const char* EnumDef::full_name()
const {
3907 inline bool EnumDef::set_full_name(
const char* fullname,
Status* s) {
3913 inline bool EnumDef::Freeze(
Status* status) {
3916 inline int32_t EnumDef::default_value()
const {
3919 inline bool EnumDef::set_default_value(int32_t
val,
Status* status) {
3923 inline bool EnumDef::AddValue(
const char*
name, int32_t num,
Status* status) {
3930 inline bool EnumDef::FindValueByName(
const char*
name, int32_t *num)
const {
3933 inline const char* EnumDef::FindValueByNumber(int32_t num)
const {
3937 inline EnumDef::Iterator::Iterator(
const EnumDef* e) {
3946 inline bool EnumDef::Iterator::Done() {
return upb_enum_done(&iter_); }
3947 inline void EnumDef::Iterator::Next() {
return upb_enum_next(&iter_); }
3951 return reffed_ptr<OneofDef>(o, &o);
3954 inline const MessageDef* OneofDef::containing_type()
const {
3960 inline bool OneofDef::set_name(
const char*
name,
Status* s) {
3966 inline int OneofDef::field_count()
const {
3979 inline const FieldDef* OneofDef::FindFieldByNumber(uint32_t num)
const {
3982 inline OneofDef::iterator
OneofDef::begin() {
return iterator(
this); }
3985 return const_iterator(
this);
3991 inline OneofDef::iterator::iterator(OneofDef* o) {
3995 OneofDef::iterator iter(o);
4002 inline void OneofDef::iterator::operator++() {
return upb_oneof_next(&iter_); }
4003 inline bool OneofDef::iterator::operator==(
const iterator &other)
const {
4007 return !(*
this == other);
4010 inline OneofDef::const_iterator::const_iterator(
const OneofDef* md) {
4014 const OneofDef *md) {
4015 OneofDef::const_iterator iter(md);
4022 inline void OneofDef::const_iterator::operator++() {
4025 inline bool OneofDef::const_iterator::operator==(
4026 const const_iterator &other)
const {
4030 const const_iterator &other)
const {
4031 return !(*
this == other);
4036 return reffed_ptr<FileDef>(
f, &
f);
4042 inline bool FileDef::set_name(
const char*
name,
Status* s) {
4048 inline const char* FileDef::package()
const {
4051 inline bool FileDef::set_package(
const char* package,
Status* s) {
4054 inline const char* FileDef::phpprefix()
const {
4057 inline bool FileDef::set_phpprefix(
const char* phpprefix,
Status* s) {
4060 inline const char* FileDef::phpnamespace()
const {
4063 inline bool FileDef::set_phpnamespace(
const char* phpnamespace,
Status* s) {
4066 inline int FileDef::def_count()
const {
4069 inline const Def* FileDef::def(
int index)
const {
4072 inline Def* FileDef::def(
int index) {
4075 inline int FileDef::dependency_count()
const {
4078 inline const FileDef* FileDef::dependency(
int index)
const {
4081 inline bool FileDef::AddDef(Def* def,
Status* s) {
4093 inline bool FileDef::AddDependency(
const FileDef* file) {
4119 #ifndef UPB_HANDLERS_H
4120 #define UPB_HANDLERS_H
4127 class HandlerAttributes;
4129 template <
class T>
class Handler;
4130 template <
class T>
struct CanonicalType;
4147 #define UPB_MAX_HANDLER_DEPTH 64
4168 #define UPB_HANDLER_MAX (UPB_HANDLER_ENDSEQ+1)
4170 #define UPB_BREAK NULL
4174 #define UPB_NO_CLOSURE &_upb_noclosure
4203 #define UPB_STARTMSG_SELECTOR 0
4204 #define UPB_ENDMSG_SELECTOR 1
4205 #define UPB_UNKNOWN_SELECTOR 2
4206 #define UPB_STATIC_SELECTOR_COUNT 3
4209 #define UPB_STARTSTR_SELECTOR 0
4210 #define UPB_STRING_SELECTOR 1
4211 #define UPB_ENDSTR_SELECTOR 2
4218 class upb::HandlerAttributes {
4220 HandlerAttributes();
4221 ~HandlerAttributes();
4226 bool SetHandlerData(
const void *handler_data);
4227 const void* handler_data()
const;
4233 bool SetClosureType(
const void *closure_type);
4234 const void* closure_type()
const;
4240 bool SetReturnClosureType(
const void *return_closure_type);
4241 const void* return_closure_type()
const;
4246 bool SetAlwaysOk(
bool always_ok);
4247 bool always_ok()
const;
4261 #define UPB_HANDLERATTR_INITIALIZER {NULL, NULL, NULL, false}
4284 class upb::BufferHandle {
4292 const char*
buffer()
const;
4296 size_t object_offset()
const;
4300 void SetBuffer(
const char*
buf,
size_t object_offset);
4305 void SetAttachedObject(
const T*
obj);
4309 const T* GetAttachedObject()
const;
4317 const char *
buf,
size_t ofs);
4344 class upb::Handlers {
4349 typedef Handler<
void *(*)(
void *,
const void *)> StartFieldHandler;
4350 typedef Handler<bool (*)(
void *,
const void *)> EndFieldHandler;
4351 typedef Handler<bool (*)(
void *,
const void *)> StartMessageHandler;
4352 typedef Handler<bool (*)(
void *,
const void *,
Status*)> EndMessageHandler;
4353 typedef Handler<
void *(*)(
void *,
const void *, size_t)> StartStringHandler;
4354 typedef Handler<size_t (*)(
void *,
const void *,
const char *, size_t,
4355 const BufferHandle *)> StringHandler;
4357 template <
class T>
struct ValueHandler {
4358 typedef Handler<bool(*)(
void *,
const void *,
T)>
H;
4371 typedef void GenericFunction();
4373 typedef void HandlersCallback(
const void *closure,
upb_handlers *
h);
4377 static reffed_ptr<Handlers>
New(
const MessageDef *
m);
4384 static reffed_ptr<const Handlers> NewFrozen(
const MessageDef *
m,
4385 HandlersCallback *callback,
4386 const void *closure);
4406 static bool Freeze(Handlers*
const* handlers,
int n,
Status* s);
4407 static bool Freeze(
const std::vector<Handlers*>& handlers,
Status* s);
4410 const MessageDef* message_def()
const;
4425 bool SetStartMessageHandler(
const StartMessageHandler&
handler);
4435 bool SetEndMessageHandler(
const EndMessageHandler&
handler);
4457 bool SetInt32Handler (
const FieldDef*
f,
const Int32Handler&
h);
4458 bool SetInt64Handler (
const FieldDef*
f,
const Int64Handler&
h);
4459 bool SetUInt32Handler(
const FieldDef*
f,
const UInt32Handler&
h);
4460 bool SetUInt64Handler(
const FieldDef*
f,
const UInt64Handler&
h);
4461 bool SetFloatHandler (
const FieldDef*
f,
const FloatHandler&
h);
4462 bool SetDoubleHandler(
const FieldDef*
f,
const DoubleHandler&
h);
4463 bool SetBoolHandler (
const FieldDef*
f,
const BoolHandler&
h);
4470 bool SetValueHandler(
4510 bool SetStartStringHandler(
const FieldDef*
f,
const StartStringHandler&
h);
4511 bool SetStringHandler(
const FieldDef*
f,
const StringHandler&
h);
4512 bool SetEndStringHandler(
const FieldDef*
f,
const EndFieldHandler&
h);
4528 bool SetStartSequenceHandler(
const FieldDef*
f,
const StartFieldHandler&
h);
4545 bool SetStartSubMessageHandler(
const FieldDef*
f,
const StartFieldHandler&
h);
4558 bool SetEndSubMessageHandler(
const FieldDef *
f,
const EndFieldHandler &
h);
4571 bool SetEndSequenceHandler(
const FieldDef*
f,
const EndFieldHandler&
h);
4575 bool SetSubHandlers(
const FieldDef*
f,
const Handlers* sub);
4576 const Handlers* GetSubHandlers(
const FieldDef*
f)
const;
4580 const Handlers* GetSubHandlers(Selector startsubmsg)
const;
4588 static bool GetSelector(
const FieldDef*
f,
Type type, Selector* s);
4591 static Selector GetEndSelector(Selector start_selector);
4595 GenericFunction* GetHandler(Selector selector);
4598 bool GetAttributes(Selector selector, HandlerAttributes* attr);
4601 const void* GetHandlerData(Selector selector);
4623 const void *top_closure_type;
4673 #define UpbMakeHandler(f) upb::MatchFunc(f).template GetFunc<f>()
4676 #define UpbBind(f, d) upb::MatchFunc(f).template GetFunc<f>((d))
4683 #define UpbMakeHandler(f) upb::MatchFunc(f).GetFunc<f>()
4685 #define UpbBind(f, d) upb::MatchFunc(f).GetFunc<f>((d))
4692 #define UpbMakeHandlerT(f) upb::MatchFunc(f).template GetFunc<f>()
4695 #define UpbBindT(f, d) upb::MatchFunc(f).template GetFunc<f>((d))
4700 template <
class T>
class Handler {
4706 template <
class F> Handler(
F func);
4710 void AddCleanup(Handlers*
h)
const {
4711 if (cleanup_func_) {
4712 bool ok =
h->AddCleanup(cleanup_data_, cleanup_func_);
4718 friend class Handlers;
4720 mutable HandlerAttributes attr_;
4721 mutable bool registered_;
4722 void *cleanup_data_;
4781 const void *closure);
4864 class upb::BytesHandler {
4935 #ifndef UPB_HANDLERS_INL_H_
4936 #define UPB_HANDLERS_INL_H_
4990 #define UPB_INT32_MAX 0x7fffffffLL
4991 #define UPB_INT32_MIN (-UPB_INT32_MAX - 1)
4992 #define UPB_INT64_MAX 0x7fffffffffffffffLL
4993 #define UPB_INT64_MIN (-UPB_INT64_MAX - 1)
4995 #if INT_MAX == UPB_INT32_MAX && INT_MIN == UPB_INT32_MIN
4996 #define UPB_INT_IS_32BITS 1
4999 #if LONG_MAX == UPB_INT32_MAX && LONG_MIN == UPB_INT32_MIN
5000 #define UPB_LONG_IS_32BITS 1
5003 #if LONG_MAX == UPB_INT64_MAX && LONG_MIN == UPB_INT64_MIN
5004 #define UPB_LONG_IS_64BITS 1
5007 #if LLONG_MAX == UPB_INT64_MAX && LLONG_MIN == UPB_INT64_MIN
5008 #define UPB_LLONG_IS_64BITS 1
5013 #if UPB_INT_IS_32BITS
5014 #define UPB_INT32_T int
5015 #define UPB_UINT32_T unsigned int
5017 #if UPB_LONG_IS_32BITS
5018 #define UPB_TWO_32BIT_TYPES 1
5019 #define UPB_INT32ALT_T long
5020 #define UPB_UINT32ALT_T unsigned long
5023 #elif UPB_LONG_IS_32BITS
5024 #define UPB_INT32_T long
5025 #define UPB_UINT32_T unsigned long
5029 #if UPB_LONG_IS_64BITS
5030 #define UPB_INT64_T long
5031 #define UPB_UINT64_T unsigned long
5033 #if UPB_LLONG_IS_64BITS
5034 #define UPB_TWO_64BIT_TYPES 1
5035 #define UPB_INT64ALT_T long long
5036 #define UPB_UINT64ALT_T unsigned long long
5039 #elif UPB_LLONG_IS_64BITS
5040 #define UPB_INT64_T long long
5041 #define UPB_UINT64_T unsigned long long
5044 #undef UPB_INT32_MAX
5045 #undef UPB_INT32_MIN
5046 #undef UPB_INT64_MAX
5047 #undef UPB_INT64_MIN
5048 #undef UPB_INT_IS_32BITS
5049 #undef UPB_LONG_IS_32BITS
5050 #undef UPB_LONG_IS_64BITS
5051 #undef UPB_LLONG_IS_64BITS
5056 typedef void CleanupFunc(
void *ptr);
5063 class CouldntRemoveConst {};
5064 template <
class T>
struct remove_constptr {
typedef CouldntRemoveConst
type; };
5065 template <
class T>
struct remove_constptr<
const T *> {
typedef T *
type; };
5069 template <
class T,
class U>
struct disable_if_same {
typedef void Type; };
5070 template <
class T>
struct disable_if_same<
T,
T> {};
5072 template <
class T>
void DeletePointer(
void *
p) {
delete static_cast<T>(
p); }
5074 template <
class T1,
class T2>
5075 struct FirstUnlessVoidOrBool {
5080 struct FirstUnlessVoidOrBool<
void, T2> {
5085 struct FirstUnlessVoidOrBool<bool, T2> {
5089 template<
class T,
class U>
5095 struct is_same<
T,
T> {
5099 template<
class T,
class U>
5108 template <
class C,
class R =
void>
5126 struct UnboundFunc {
5127 CleanupFunc *GetCleanup() {
return NULL; }
5131 template <
class R,
class P1, R F(P1),
class I>
5132 struct Func1 :
public UnboundFunc {
5135 static R Call(P1 p1) {
return F(p1); }
5138 template <
class R,
class P1,
class P2, R F(P1, P2),
class I>
5139 struct Func2 :
public UnboundFunc {
5142 static R Call(P1 p1, P2 p2) {
return F(p1, p2); }
5145 template <
class R,
class P1,
class P2,
class P3, R F(P1, P2, P3),
class I>
5146 struct Func3 :
public UnboundFunc {
5149 static R Call(P1 p1, P2 p2, P3 p3) {
return F(p1, p2, p3); }
5152 template <
class R,
class P1,
class P2,
class P3,
class P4, R
F(P1, P2, P3, P4),
5154 struct Func4 :
public UnboundFunc {
5157 static R Call(P1 p1, P2 p2, P3 p3, P4 p4) {
return F(p1, p2, p3, p4); }
5160 template <
class R,
class P1,
class P2,
class P3,
class P4,
class P5,
5161 R
F(P1, P2, P3, P4, P5),
class I>
5162 struct Func5 :
public UnboundFunc {
5165 static R Call(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
5166 return F(p1, p2, p3, p4, p5);
5181 CleanupFunc *GetCleanup() {
return &DeletePointer<MutableP2>; }
5186 template <
class R,
class P1,
class P2, R F(P1, P2),
class I>
5187 struct BoundFunc2 :
public BoundFunc<P2> {
5188 typedef BoundFunc<P2> Base;
5190 explicit BoundFunc2(
typename Base::MutableP2 arg) : Base(arg) {}
5193 template <
class R,
class P1,
class P2,
class P3, R F(P1, P2, P3),
class I>
5194 struct BoundFunc3 :
public BoundFunc<P2> {
5195 typedef BoundFunc<P2> Base;
5197 explicit BoundFunc3(
typename Base::MutableP2 arg) : Base(arg) {}
5200 template <
class R,
class P1,
class P2,
class P3,
class P4, R
F(P1, P2, P3, P4),
5202 struct BoundFunc4 :
public BoundFunc<P2> {
5203 typedef BoundFunc<P2> Base;
5205 explicit BoundFunc4(
typename Base::MutableP2 arg) : Base(arg) {}
5208 template <
class R,
class P1,
class P2,
class P3,
class P4,
class P5,
5209 R
F(P1, P2, P3, P4, P5),
class I>
5210 struct BoundFunc5 :
public BoundFunc<P2> {
5211 typedef BoundFunc<P2> Base;
5213 explicit BoundFunc5(
typename Base::MutableP2 arg) : Base(arg) {}
5223 template <
class R,
class P1>
5226 Func1<R, P1, F, FuncInfo<P1, R> > GetFunc() {
5227 return Func1<R, P1, F, FuncInfo<P1, R> >();
5231 template <
class R,
class P1,
class P2>
5233 template <R F(P1, P2)>
5234 Func2<R, P1, P2, F, FuncInfo<P1, R> > GetFunc() {
5235 return Func2<R, P1, P2, F, FuncInfo<P1, R> >();
5238 template <R F(P1, P2)>
5239 BoundFunc2<R, P1, P2, F, FuncInfo<P1, R> > GetFunc(
5241 return BoundFunc2<R, P1, P2, F, FuncInfo<P1, R> >(param2);
5245 template <
class R,
class P1,
class P2,
class P3>
5247 template <R F(P1, P2, P3)>
5248 Func3<R, P1, P2, P3, F, FuncInfo<P1, R> > GetFunc() {
5249 return Func3<R, P1, P2, P3, F, FuncInfo<P1, R> >();
5252 template <R F(P1, P2, P3)>
5253 BoundFunc3<R, P1, P2, P3, F, FuncInfo<P1, R> > GetFunc(
5255 return BoundFunc3<R, P1, P2, P3, F, FuncInfo<P1, R> >(param2);
5259 template <
class R,
class P1,
class P2,
class P3,
class P4>
5261 template <R F(P1, P2, P3, P4)>
5262 Func4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> > GetFunc() {
5263 return Func4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> >();
5266 template <R F(P1, P2, P3, P4)>
5267 BoundFunc4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> > GetFunc(
5269 return BoundFunc4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> >(param2);
5273 template <
class R,
class P1,
class P2,
class P3,
class P4,
class P5>
5275 template <R F(P1, P2, P3, P4, P5)>
5276 Func5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> > GetFunc() {
5277 return Func5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> >();
5280 template <R F(P1, P2, P3, P4, P5)>
5281 BoundFunc5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> > GetFunc(
5283 return BoundFunc5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> >(param2);
5289 template <
class R,
class P1>
5290 inline FuncSig1<R, P1> MatchFunc(R (*
f)(P1)) {
5292 return FuncSig1<R, P1>();
5295 template <
class R,
class P1,
class P2>
5296 inline FuncSig2<R, P1, P2> MatchFunc(R (*
f)(P1, P2)) {
5298 return FuncSig2<R, P1, P2>();
5301 template <
class R,
class P1,
class P2,
class P3>
5302 inline FuncSig3<R, P1, P2, P3> MatchFunc(R (*
f)(P1, P2, P3)) {
5304 return FuncSig3<R, P1, P2, P3>();
5307 template <
class R,
class P1,
class P2,
class P3,
class P4>
5308 inline FuncSig4<R, P1, P2, P3, P4> MatchFunc(R (*
f)(P1, P2, P3, P4)) {
5310 return FuncSig4<R, P1, P2, P3, P4>();
5313 template <
class R,
class P1,
class P2,
class P3,
class P4,
class P5>
5314 inline FuncSig5<R, P1, P2, P3, P4, P5> MatchFunc(R (*
f)(P1, P2, P3, P4, P5)) {
5316 return FuncSig5<R, P1, P2, P3, P4, P5>();
5322 template <
class R,
class C, R (C::*F)()>
5323 R CallMethod0(C *
obj) {
5324 return ((*obj).*
F)();
5327 template <
class R,
class C,
class P1, R (C::*F)(P1)>
5328 R CallMethod1(C *
obj, P1 arg1) {
5329 return ((*obj).*
F)(arg1);
5332 template <
class R,
class C,
class P1,
class P2, R (C::*F)(P1, P2)>
5333 R CallMethod2(C *
obj, P1 arg1, P2 arg2) {
5334 return ((*obj).*
F)(arg1, arg2);
5337 template <
class R,
class C,
class P1,
class P2,
class P3, R (C::*F)(P1, P2, P3)>
5338 R CallMethod3(C *
obj, P1 arg1, P2 arg2, P3 arg3) {
5339 return ((*obj).*
F)(arg1, arg2, arg3);
5342 template <
class R,
class C,
class P1,
class P2,
class P3,
class P4,
5343 R (C::*
F)(P1, P2, P3, P4)>
5344 R CallMethod4(C *
obj, P1 arg1, P2 arg2, P3 arg3, P4 arg4) {
5345 return ((*obj).*
F)(arg1, arg2, arg3, arg4);
5352 template <
class R,
class C>
5354 template <R (C::*F)()>
5355 Func1<R, C *, CallMethod0<R, C, F>, FuncInfo<C *, R> > GetFunc() {
5356 return Func1<R, C *, CallMethod0<R, C, F>, FuncInfo<C *, R> >();
5360 template <
class R,
class C,
class P1>
5362 template <R (C::*F)(P1)>
5363 Func2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> > GetFunc() {
5364 return Func2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> >();
5367 template <R (C::*F)(P1)>
5368 BoundFunc2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> > GetFunc(
5370 return BoundFunc2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> >(
5375 template <
class R,
class C,
class P1,
class P2>
5377 template <R (C::*F)(P1, P2)>
5378 Func3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>, FuncInfo<C *, R> >
5380 return Func3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>,
5381 FuncInfo<C *, R> >();
5384 template <R (C::*F)(P1, P2)>
5385 BoundFunc3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>, FuncInfo<C *, R> >
5387 return BoundFunc3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>,
5388 FuncInfo<C *, R> >(param1);
5392 template <
class R,
class C,
class P1,
class P2,
class P3>
5394 template <R (C::*F)(P1, P2, P3)>
5395 Func4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>, FuncInfo<C *, R> >
5397 return Func4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>,
5398 FuncInfo<C *, R> >();
5401 template <R (C::*F)(P1, P2, P3)>
5402 BoundFunc4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>,
5405 return BoundFunc4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>,
5406 FuncInfo<C *, R> >(param1);
5410 template <
class R,
class C,
class P1,
class P2,
class P3,
class P4>
5412 template <R (C::*F)(P1, P2, P3, P4)>
5413 Func5<R, C *, P1, P2, P3, P4, CallMethod4<R, C, P1, P2, P3, P4, F>,
5416 return Func5<R, C *, P1, P2, P3, P4, CallMethod4<R, C, P1, P2, P3, P4, F>,
5417 FuncInfo<C *, R> >();
5420 template <R (C::*F)(P1, P2, P3, P4)>
5421 BoundFunc5<R, C *, P1, P2, P3, P4, CallMethod4<R, C, P1, P2, P3, P4, F>,
5424 return BoundFunc5<R, C *, P1, P2, P3, P4,
5425 CallMethod4<R, C, P1, P2, P3, P4, F>, FuncInfo<C *, R> >(
5430 template <
class R,
class C>
5431 inline MethodSig0<R, C> MatchFunc(R (C::*
f)()) {
5433 return MethodSig0<R, C>();
5436 template <
class R,
class C,
class P1>
5437 inline MethodSig1<R, C, P1> MatchFunc(R (C::*
f)(P1)) {
5439 return MethodSig1<R, C, P1>();
5442 template <
class R,
class C,
class P1,
class P2>
5443 inline MethodSig2<R, C, P1, P2> MatchFunc(R (C::*
f)(P1, P2)) {
5445 return MethodSig2<R, C, P1, P2>();
5448 template <
class R,
class C,
class P1,
class P2,
class P3>
5449 inline MethodSig3<R, C, P1, P2, P3> MatchFunc(R (C::*
f)(P1, P2, P3)) {
5451 return MethodSig3<R, C, P1, P2, P3>();
5454 template <
class R,
class C,
class P1,
class P2,
class P3,
class P4>
5455 inline MethodSig4<R, C, P1, P2, P3, P4> MatchFunc(R (C::*
f)(P1, P2, P3, P4)) {
5457 return MethodSig4<R, C, P1, P2, P3, P4>();
5477 template <
class F,
class R,
class Enable =
void>
5478 struct MaybeWrapReturn;
5482 struct MaybeWrapReturn<
F, typename
F::
Return> {
5487 template <
class P1,
class P2,
void F(P1, P2)>
5488 bool ReturnTrue2(P1 p1, P2 p2) {
5493 template <
class P1,
class P2,
class P3,
void F(P1, P2, P3)>
5494 bool ReturnTrue3(P1 p1, P2 p2, P3 p3) {
5500 template <
class P1,
class P2,
void F(P1, P2)>
5501 void *ReturnClosure2(P1 p1, P2 p2) {
5506 template <
class P1,
class P2,
class P3,
void F(P1, P2, P3)>
5507 void *ReturnClosure3(P1 p1, P2 p2, P3 p3) {
5513 template <
class R,
class P1,
class P2, R F(P1, P2)>
5514 void *CastReturnToVoidPtr2(P1 p1, P2 p2) {
5518 template <
class R,
class P1,
class P2,
class P3, R F(P1, P2, P3)>
5519 void *CastReturnToVoidPtr3(P1 p1, P2 p2, P3 p3) {
5520 return F(p1, p2, p3);
5524 template <
class P1,
class P2,
bool F(P1, P2)>
5525 void *ReturnClosureOrBreak2(P1 p1, P2 p2) {
5529 template <
class P1,
class P2,
class P3,
bool F(P1, P2, P3)>
5530 void *ReturnClosureOrBreak3(P1 p1, P2 p2, P3 p3) {
5535 template <
class P1,
class P2,
5536 void F(P1, P2,
const char *,
size_t,
const BufferHandle *)>
5537 size_t ReturnStringLen(P1 p1, P2 p2,
const char *p3,
size_t p4,
5538 const BufferHandle *p5) {
5539 F(p1, p2, p3, p4, p5);
5545 template <
class P1,
class P2,
5546 bool F(P1, P2,
const char *,
size_t,
const BufferHandle *)>
5547 size_t ReturnNOr0(P1 p1, P2 p2,
const char *p3,
size_t p4,
5548 const BufferHandle *p5) {
5549 return F(p1, p2, p3, p4, p5) ? p4 : 0;
5554 template <
class P1,
class P2,
void F(P1, P2),
class I>
5555 struct MaybeWrapReturn<Func2<
void, P1, P2,
F, I>, bool> {
5556 typedef Func2<bool, P1, P2, ReturnTrue2<P1, P2, F>, I>
Func;
5559 template <
class P1,
class P2,
class P3,
void F(P1, P2, P3),
class I>
5560 struct MaybeWrapReturn<Func3<
void, P1, P2, P3,
F, I>, bool> {
5561 typedef Func3<bool, P1, P2, P3, ReturnTrue3<P1, P2, P3, F>, I>
Func;
5566 template <
class P1,
class P2,
void F(P1, P2),
class I>
5567 struct MaybeWrapReturn<Func2<
void, P1, P2,
F, I>,
void *> {
5568 typedef Func2<void *, P1, P2, ReturnClosure2<P1, P2, F>, I>
Func;
5571 template <
class P1,
class P2,
class P3,
void F(P1, P2, P3),
class I>
5572 struct MaybeWrapReturn<Func3<
void, P1, P2, P3,
F, I>,
void *> {
5573 typedef Func3<void *, P1, P2, P3, ReturnClosure3<P1, P2, P3, F>, I>
Func;
5578 template <
class R,
class P1,
class P2, R *F(P1, P2),
class I>
5579 struct MaybeWrapReturn<Func2<R *, P1, P2,
F, I>,
void *,
5581 typedef Func2<void *, P1, P2, CastReturnToVoidPtr2<R *, P1, P2, F>, I>
Func;
5584 template <
class R,
class P1,
class P2,
class P3, R *F(P1, P2, P3),
class I>
5585 struct MaybeWrapReturn<Func3<R *, P1, P2, P3,
F, I>,
void *,
5587 typedef Func3<void *, P1, P2, P3, CastReturnToVoidPtr3<R *, P1, P2, P3, F>, I>
5593 template <
class P1,
class P2,
bool F(P1, P2),
class I>
5594 struct MaybeWrapReturn<Func2<bool, P1, P2,
F, I>,
void *> {
5595 typedef Func2<void *, P1, P2, ReturnClosureOrBreak2<P1, P2, F>, I>
Func;
5598 template <
class P1,
class P2,
class P3,
bool F(P1, P2, P3),
class I>
5599 struct MaybeWrapReturn<Func3<bool, P1, P2, P3,
F, I>,
void *> {
5600 typedef Func3<void *, P1, P2, P3, ReturnClosureOrBreak3<P1, P2, P3, F>, I>
5606 template <
class P1,
class P2,
5607 void F(P1, P2,
const char *,
size_t,
const BufferHandle *),
class I>
5608 struct MaybeWrapReturn<
5609 Func5<
void, P1, P2,
const char *, size_t,
const BufferHandle *,
F, I>,
5611 typedef Func5<size_t, P1, P2,
const char *, size_t,
const BufferHandle *,
5612 ReturnStringLen<P1, P2, F>, I>
Func;
5617 template <
class P1,
class P2,
5618 bool F(P1, P2,
const char *,
size_t,
const BufferHandle *),
class I>
5619 struct MaybeWrapReturn<
5620 Func5<bool, P1, P2,
const char *, size_t,
const BufferHandle *,
F, I>,
5622 typedef Func5<size_t, P1, P2,
const char *, size_t,
const BufferHandle *,
5623 ReturnNOr0<P1, P2, F>, I>
Func;
5632 template <
class F,
class T>
5633 struct ConvertParams;
5636 template <
class R,
class P1, R F(P1)>
5637 R IgnoreHandlerData2(
void *p1,
const void *hd) {
5639 return F(
static_cast<P1
>(p1));
5642 template <
class R,
class P1,
class P2Wrapper,
class P2Wrapped,
5644 R IgnoreHandlerData3(
void *p1,
const void *hd, P2Wrapper p2) {
5646 return F(
static_cast<P1
>(p1), p2);
5649 template <
class R,
class P1,
class P2,
class P3, R F(P1, P2, P3)>
5650 R IgnoreHandlerData4(
void *p1,
const void *hd, P2 p2, P3 p3) {
5652 return F(
static_cast<P1
>(p1), p2, p3);
5655 template <
class R,
class P1,
class P2,
class P3,
class P4, R F(P1, P2, P3, P4)>
5656 R IgnoreHandlerData5(
void *p1,
const void *hd, P2 p2, P3 p3, P4 p4) {
5658 return F(
static_cast<P1
>(p1), p2, p3, p4);
5661 template <
class R,
class P1, R F(P1, const
char*,
size_t)>
5662 R IgnoreHandlerDataIgnoreHandle(
void *p1,
const void *hd,
const char *p2,
5663 size_t p3,
const BufferHandle *handle) {
5666 return F(
static_cast<P1
>(p1), p2, p3);
5670 template <
class R,
class P1,
class P2, R F(P1, P2)>
5671 R CastHandlerData2(
void *c,
const void *hd) {
5672 return F(
static_cast<P1
>(c),
static_cast<P2
>(hd));
5675 template <
class R,
class P1,
class P2,
class P3Wrapper,
class P3Wrapped,
5676 R
F(P1, P2, P3Wrapped)>
5677 R CastHandlerData3(
void *c,
const void *hd, P3Wrapper p3) {
5678 return F(
static_cast<P1
>(c),
static_cast<P2
>(hd), p3);
5681 template <
class R,
class P1,
class P2,
class P3,
class P4,
class P5,
5682 R
F(P1, P2, P3, P4, P5)>
5683 R CastHandlerData5(
void *c,
const void *hd, P3 p3, P4 p4, P5 p5) {
5684 return F(
static_cast<P1
>(c),
static_cast<P2
>(hd), p3, p4, p5);
5687 template <
class R,
class P1,
class P2, R F(P1, P2, const
char *,
size_t)>
5688 R CastHandlerDataIgnoreHandle(
void *c,
const void *hd,
const char *p3,
5689 size_t p4,
const BufferHandle *handle) {
5691 return F(
static_cast<P1
>(c),
static_cast<P2
>(hd), p3, p4);
5695 template <
class R,
class P1, R F(P1),
class I,
class T>
5696 struct ConvertParams<Func1<R, P1,
F, I>,
T> {
5697 typedef Func2<R, void *, const void *, IgnoreHandlerData2<R, P1, F>, I>
Func;
5700 template <
class R,
class P1,
class P2, R
F(P1, P2),
class I,
5701 class R2,
class P1_2,
class P2_2,
class P3_2>
5702 struct ConvertParams<Func2<R, P1, P2,
F, I>,
5703 R2 (*)(P1_2, P2_2, P3_2)> {
5704 typedef Func3<R,
void *,
const void *, P3_2,
5705 IgnoreHandlerData3<R, P1, P3_2, P2, F>, I>
Func;
5710 template <
class R,
class P1, R F(P1, const
char *,
size_t),
class I,
class T>
5711 struct ConvertParams<Func3<R, P1,
const char *, size_t,
F, I>,
T> {
5712 typedef Func5<R,
void *,
const void *,
const char *, size_t,
5713 const BufferHandle *, IgnoreHandlerDataIgnoreHandle<R, P1, F>,
5717 template <
class R,
class P1,
class P2,
class P3,
class P4, R
F(P1, P2, P3, P4),
5719 struct ConvertParams<Func4<R, P1, P2, P3, P4,
F, I>,
T> {
5720 typedef Func5<R,
void *,
const void *, P2, P3, P4,
5721 IgnoreHandlerData5<R, P1, P2, P3, P4, F>, I>
Func;
5725 template <
class R,
class P1,
class P2, R F(P1, P2),
class I,
class T>
5726 struct ConvertParams<BoundFunc2<R, P1, P2,
F, I>,
T> {
5727 typedef Func2<R, void *, const void *, CastHandlerData2<R, P1, P2, F>, I>
5731 template <
class R,
class P1,
class P2,
class P3, R
F(P1, P2, P3),
class I,
5732 class R2,
class P1_2,
class P2_2,
class P3_2>
5733 struct ConvertParams<BoundFunc3<R, P1, P2, P3,
F, I>,
5734 R2 (*)(P1_2, P2_2, P3_2)> {
5735 typedef Func3<R,
void *,
const void *, P3_2,
5736 CastHandlerData3<R, P1, P2, P3_2, P3, F>, I>
Func;
5740 template <
class R,
class P1,
class P2, R
F(P1, P2,
const char *,
size_t),
5742 struct ConvertParams<BoundFunc4<R, P1, P2,
const char *, size_t,
F, I>,
T> {
5743 typedef Func5<R,
void *,
const void *,
const char *, size_t,
5744 const BufferHandle *, CastHandlerDataIgnoreHandle<R, P1, P2, F>,
5748 template <
class R,
class P1,
class P2,
class P3,
class P4,
class P5,
5749 R
F(P1, P2, P3, P4, P5),
class I,
class T>
5750 struct ConvertParams<BoundFunc5<R, P1, P2, P3, P4, P5,
F, I>,
T> {
5751 typedef Func5<R,
void *,
const void *, P3, P4, P5,
5752 CastHandlerData5<R, P1, P2, P3, P4, P5, F>, I>
Func;
5757 #define TYPE_METHODS(utype, ltype, ctype, vtype) \
5758 template <> struct CanonicalType<vtype> { \
5759 typedef ctype Type; \
5762 inline bool Handlers::SetValueHandler<vtype>( \
5763 const FieldDef *f, \
5764 const Handlers::utype ## Handler& handler) { \
5765 UPB_ASSERT(!handler.registered_); \
5766 handler.AddCleanup(this); \
5767 handler.registered_ = true; \
5768 return upb_handlers_set##ltype(this, f, handler.handler_, &handler.attr_); \
5771 TYPE_METHODS(
Double,
double,
double,
double)
5772 TYPE_METHODS(
Float,
float,
float,
float)
5775 TYPE_METHODS(
Int64,
int64, int64_t, UPB_INT64_T)
5776 TYPE_METHODS(
Int32,
int32, int32_t, UPB_INT32_T)
5777 TYPE_METHODS(
Bool,
bool,
bool,
bool)
5779 #ifdef UPB_TWO_32BIT_TYPES
5780 TYPE_METHODS(
Int32,
int32, int32_t, UPB_INT32ALT_T)
5781 TYPE_METHODS(
UInt32,
uint32, uint32_t, UPB_UINT32ALT_T)
5784 #ifdef UPB_TWO_64BIT_TYPES
5785 TYPE_METHODS(
Int64,
int64, int64_t, UPB_INT64ALT_T)
5786 TYPE_METHODS(
UInt64,
uint64, uint64_t, UPB_UINT64ALT_T)
5790 template <>
struct CanonicalType<
Status*> {
5797 #define TYPE_METHODS(utype, ctype) \
5798 inline bool Handlers::Set##utype##Handler(const FieldDef *f, \
5799 const utype##Handler &h) { \
5800 return SetValueHandler<ctype>(f, h); \
5803 TYPE_METHODS(
Double,
double)
5804 TYPE_METHODS(
Float,
float)
5805 TYPE_METHODS(
UInt64, uint64_t)
5806 TYPE_METHODS(
UInt32, uint32_t)
5807 TYPE_METHODS(
Int64, int64_t)
5808 TYPE_METHODS(
Int32, int32_t)
5809 TYPE_METHODS(
Bool,
bool)
5812 template <
class F>
struct ReturnOf;
5814 template <
class R,
class P1,
class P2>
5815 struct ReturnOf<R (*)(P1, P2)> {
5819 template <
class R,
class P1,
class P2,
class P3>
5820 struct ReturnOf<R (*)(P1, P2, P3)> {
5824 template <
class R,
class P1,
class P2,
class P3,
class P4>
5825 struct ReturnOf<R (*)(P1, P2, P3, P4)> {
5829 template <
class R,
class P1,
class P2,
class P3,
class P4,
class P5>
5830 struct ReturnOf<R (*)(P1, P2, P3, P4, P5)> {
5834 template<
class T>
const void *UniquePtrForType() {
5835 static const char ch = 0;
5841 inline Handler<T>::Handler(
F func)
5842 : registered_(
false),
5844 cleanup_func_(
func.GetCleanup()) {
5850 handler_ = ReturnWrappedFunc().Call;
5858 attr_.SetAlwaysOk(always_ok);
5861 attr_.SetClosureType(UniquePtrForType<typename F::FuncInfo::Closure>());
5870 typename F::FuncInfo::Closure>
::value
5872 attr_.SetReturnClosureType(UniquePtrForType<EffectiveReturn>());
5876 inline Handler<T>::~Handler() {
5882 inline bool HandlerAttributes::SetHandlerData(
const void *hd) {
5885 inline const void* HandlerAttributes::handler_data()
const {
5888 inline bool HandlerAttributes::SetClosureType(
const void *
type) {
5891 inline const void* HandlerAttributes::closure_type()
const {
5894 inline bool HandlerAttributes::SetReturnClosureType(
const void *
type) {
5897 inline const void* HandlerAttributes::return_closure_type()
const {
5900 inline bool HandlerAttributes::SetAlwaysOk(
bool always_ok) {
5903 inline bool HandlerAttributes::always_ok()
const {
5912 inline size_t BufferHandle::object_offset()
const {
5915 inline void BufferHandle::SetBuffer(
const char*
buf,
size_t ofs) {
5919 void BufferHandle::SetAttachedObject(
const T*
obj) {
5923 const T* BufferHandle::GetAttachedObject()
const {
5931 return reffed_ptr<Handlers>(
h, &
h);
5933 inline reffed_ptr<const Handlers> Handlers::NewFrozen(
5935 const void *closure) {
5937 return reffed_ptr<const Handlers>(
h, &
h);
5939 inline const Status* Handlers::status() {
5942 inline void Handlers::ClearError() {
5945 inline bool Handlers::Freeze(
Status *s) {
5946 upb::Handlers*
h =
this;
5949 inline bool Handlers::Freeze(Handlers *
const *handlers,
int n,
Status *s) {
5952 inline bool Handlers::Freeze(
const std::vector<Handlers*>&
h,
Status* status) {
5955 inline const MessageDef *Handlers::message_def()
const {
5961 inline bool Handlers::SetStartMessageHandler(
5962 const Handlers::StartMessageHandler &
handler) {
5968 inline bool Handlers::SetEndMessageHandler(
5969 const Handlers::EndMessageHandler &
handler) {
5975 inline bool Handlers::SetStartStringHandler(
const FieldDef *
f,
5976 const StartStringHandler &
handler) {
5982 inline bool Handlers::SetEndStringHandler(
const FieldDef *
f,
5983 const EndFieldHandler &
handler) {
5989 inline bool Handlers::SetStringHandler(
const FieldDef *
f,
5990 const StringHandler&
handler) {
5996 inline bool Handlers::SetStartSequenceHandler(
5997 const FieldDef *
f,
const StartFieldHandler &
handler) {
6003 inline bool Handlers::SetStartSubMessageHandler(
6004 const FieldDef *
f,
const StartFieldHandler &
handler) {
6010 inline bool Handlers::SetEndSubMessageHandler(
const FieldDef *
f,
6011 const EndFieldHandler &
handler) {
6017 inline bool Handlers::SetEndSequenceHandler(
const FieldDef *
f,
6018 const EndFieldHandler &
handler) {
6024 inline bool Handlers::SetSubHandlers(
const FieldDef *
f,
const Handlers *sub) {
6027 inline const Handlers *Handlers::GetSubHandlers(
const FieldDef *
f)
const {
6030 inline const Handlers *Handlers::GetSubHandlers(Handlers::Selector sel)
const {
6034 Handlers::Selector *s) {
6037 inline Handlers::Selector Handlers::GetEndSelector(Handlers::Selector
start) {
6040 inline Handlers::GenericFunction *Handlers::GetHandler(
6041 Handlers::Selector selector) {
6044 inline const void *Handlers::GetHandlerData(Handlers::Selector selector) {
6048 inline BytesHandler::BytesHandler() {
6052 inline BytesHandler::~BytesHandler() {}
6059 #undef UPB_TWO_32BIT_TYPES
6060 #undef UPB_TWO_64BIT_TYPES
6063 #undef UPB_INT32ALT_T
6064 #undef UPB_UINT32ALT_T
6067 #undef UPB_INT64ALT_T
6068 #undef UPB_UINT64ALT_T
6155 template <
class T> Sink(
const Handlers* handlers,
T* closure);
6158 template <
class T>
void Reset(
const Handlers* handlers,
T* closure);
6164 template <
class T>
T* GetObject()
const;
6182 bool StartMessage();
6183 bool EndMessage(
Status* status);
6188 bool PutInt32(Handlers::Selector s, int32_t
val);
6189 bool PutInt64(Handlers::Selector s, int64_t
val);
6190 bool PutUInt32(Handlers::Selector s, uint32_t
val);
6191 bool PutUInt64(Handlers::Selector s, uint64_t
val);
6192 bool PutFloat(Handlers::Selector s,
float val);
6193 bool PutDouble(Handlers::Selector s,
double val);
6194 bool PutBool(Handlers::Selector s,
bool val);
6201 bool StartString(Handlers::Selector s,
size_t size_hint, Sink* sub);
6202 size_t PutStringBuffer(Handlers::Selector s,
const char *
buf,
size_t len,
6203 const BufferHandle *handle);
6204 bool EndString(Handlers::Selector s);
6211 bool StartSubMessage(Handlers::Selector s, Sink* sub);
6212 bool EndSubMessage(Handlers::Selector s);
6220 bool StartSequence(Handlers::Selector s, Sink* sub);
6221 bool EndSequence(Handlers::Selector s);
6235 class upb::BytesSink {
6243 template <
class T> BytesSink(
const BytesHandler*
handler,
T* closure);
6246 template <
class T>
void Reset(
const BytesHandler*
handler,
T* closure);
6248 bool Start(
size_t size_hint,
void **subc);
6249 size_t PutBuffer(
void *subc,
const char *
buf,
size_t len,
6250 const BufferHandle *handle);
6265 class upb::BufferSource {
6268 BufferSource(
const char*
buf,
size_t len, BytesSink* sink);
6277 static bool PutBuffer(
const char*
buf,
size_t len, BytesSink* sink);
6279 template <
class T>
static bool PutBuffer(
const T&
str, BytesSink* sink) {
6280 return PutBuffer(
str.c_str(),
str.size(), sink);
6302 s->closure = closure;
6310 if (!
s->handler)
return true;
6317 return *subc !=
NULL;
6325 if (!
s->handler)
return true;
6337 if (!
s->handler)
return true;
6340 if (!
end)
return true;
6341 return end(
s->closure,
6348 #define PUTVAL(type, ctype) \
6349 UPB_INLINE bool upb_sink_put##type(upb_sink *s, upb_selector_t sel, \
6351 typedef upb_##type##_handlerfunc functype; \
6354 if (!s->handlers) return true; \
6355 func = (functype *)upb_handlers_gethandler(s->handlers, sel); \
6356 if (!func) return true; \
6357 hd = upb_handlers_gethandlerdata(s->handlers, sel); \
6358 return func(s->closure, hd, val); \
6376 const char *
buf,
size_t n,
6381 if (!
s->handlers)
return n;
6393 if (!
s->handlers)
return true;
6405 if (!
s->handlers)
return true;
6417 if (!
s->handlers)
return true;
6420 if (!
endmsg)
return true;
6422 return endmsg(
s->closure, hd, status);
6432 if (!
s->handlers)
return true;
6445 if (!
s->handlers)
return true;
6448 if (!
endseq)
return true;
6450 return endseq(
s->closure, hd);
6460 if (!
s->handlers)
return true;
6463 if (!startstr)
return true;
6465 sub->
closure = startstr(
s->closure, hd, size_hint);
6473 if (!
s->handlers)
return true;
6476 if (!endstr)
return true;
6478 return endstr(
s->closure, hd);
6494 if (!startsubmsg)
return true;
6496 sub->
closure = startsubmsg(
s->closure, hd);
6504 if (!
s->handlers)
return true;
6507 if (!endsubmsg)
return s->closure;
6509 return endsubmsg(
s->closure, hd);
6518 template <
class T> Sink::Sink(
const Handlers* handlers,
T* closure) {
6522 inline void Sink::Reset(
const Handlers* handlers,
T* closure) {
6525 inline bool Sink::StartMessage() {
6528 inline bool Sink::EndMessage(
Status* status) {
6531 inline bool Sink::PutInt32(Handlers::Selector sel, int32_t
val) {
6532 return upb_sink_putint32(
this, sel,
val);
6534 inline bool Sink::PutInt64(Handlers::Selector sel, int64_t
val) {
6535 return upb_sink_putint64(
this, sel,
val);
6537 inline bool Sink::PutUInt32(Handlers::Selector sel, uint32_t
val) {
6538 return upb_sink_putuint32(
this, sel,
val);
6540 inline bool Sink::PutUInt64(Handlers::Selector sel, uint64_t
val) {
6541 return upb_sink_putuint64(
this, sel,
val);
6543 inline bool Sink::PutFloat(Handlers::Selector sel,
float val) {
6544 return upb_sink_putfloat(
this, sel,
val);
6546 inline bool Sink::PutDouble(Handlers::Selector sel,
double val) {
6547 return upb_sink_putdouble(
this, sel,
val);
6549 inline bool Sink::PutBool(Handlers::Selector sel,
bool val) {
6550 return upb_sink_putbool(
this, sel,
val);
6552 inline bool Sink::StartString(Handlers::Selector sel,
size_t size_hint,
6556 inline size_t Sink::PutStringBuffer(Handlers::Selector sel,
const char *
buf,
6557 size_t len,
const BufferHandle* handle) {
6560 inline bool Sink::EndString(Handlers::Selector sel) {
6563 inline bool Sink::StartSubMessage(Handlers::Selector sel, Sink* sub) {
6566 inline bool Sink::EndSubMessage(Handlers::Selector sel) {
6569 inline bool Sink::StartSequence(Handlers::Selector sel, Sink* sub) {
6572 inline bool Sink::EndSequence(Handlers::Selector sel) {
6577 BytesSink::BytesSink(
const BytesHandler*
handler,
T* closure) {
6585 inline bool BytesSink::Start(
size_t size_hint,
void **subc) {
6588 inline size_t BytesSink::PutBuffer(
void *subc,
const char *
buf,
size_t len,
6589 const BufferHandle *handle) {
6596 inline bool BufferSource::PutBuffer(
const char *
buf,
size_t len,
6640 uint16_t submsg_index;
6641 uint8_t descriptortype;
6670 #define UPB_STRVIEW_INIT(ptr, len) {ptr, len}
6693 #define ACCESSORS(name, membername, ctype) \
6694 UPB_INLINE ctype upb_msgval_get ## name(upb_msgval v) { \
6695 return v.membername; \
6697 UPB_INLINE void upb_msgval_set ## name(upb_msgval *v, ctype cval) { \
6698 v->membername = cval; \
6700 UPB_INLINE upb_msgval upb_msgval_ ## name(ctype v) { \
6702 ret.membername = v; \
6870 #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
6871 #define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
6878 #ifndef UPB_GENERATED_UTIL_H_
6879 #define UPB_GENERATED_UTIL_H_
6886 #ifndef UPB_STRUCTS_H_
6887 #define UPB_STRUCTS_H_
6892 uint8_t element_size;
6902 #define PTR_AT(msg, ofs, type) (type*)((const char*)msg + ofs)
6938 if (!arr)
return NULL;
6944 size_t old_bytes = arr->
size * elem_size;
6947 while (new_size <
size) new_size *= 2;
6948 new_bytes = new_size * elem_size;
6953 arr->
size = new_size;
6966 size_t i = arr ? arr->
len : 0;
6969 if (!
data)
return false;
6975 return (*
PTR_AT(msg,
idx / 8,
const char) & (
idx % 8)) != 0;
6979 return (*
PTR_AT(msg,
idx / 8,
char)) |= (1 << (
idx % 8));
6983 return (*
PTR_AT(msg,
idx / 8,
char)) &= ~(1 << (
idx % 8));
6987 return *
PTR_AT(msg, case_ofs, int32_t) == num;
6999 #ifndef UPB_DECODE_H_
7000 #define UPB_DECODE_H_
7014 #ifndef UPB_ENCODE_H_
7015 #define UPB_ENCODE_H_
7302 if (!sub)
return NULL;
7315 if (!sub)
return NULL;
7449 if (!sub)
return NULL;
7528 if (!sub)
return NULL;
7663 if (!sub)
return NULL;
7708 if (!sub)
return NULL;
7761 if (!sub)
return NULL;
7855 if (!sub)
return NULL;
7906 if (!sub)
return NULL;
7959 if (!sub)
return NULL;
8684 #ifndef UPB_MSGFACTORY_H_
8685 #define UPB_MSGFACTORY_H_
8689 class MessageFactory;
8732 #ifndef UPB_DESCRIPTOR_H
8733 #define UPB_DESCRIPTOR_H
8750 class upb::descriptor::Reader {
8760 static Reader* Create(Environment* env,
const Handlers* handlers);
8766 size_t file_count()
const;
8767 FileDef* file(
size_t i)
const;
8770 static Handlers* NewHandlers(
const void* owner);
8793 inline Reader* Reader::Create(Environment* e,
const Handlers *
h) {
8797 inline size_t Reader::file_count()
const {
8800 inline FileDef* Reader::file(
size_t i)
const {
8822 #ifndef UPB_DESCRIPTOR_DESCRIPTOR_PROTO_UPB_H_
8823 #define UPB_DESCRIPTOR_DESCRIPTOR_PROTO_UPB_H_
9060 namespace protobuf {
9062 class DescriptorProto :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9065 : reffed_ptr(
m, ref_donor) {
9074 class ExtensionRange :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9076 ExtensionRange(const ::upb::MessageDef*
m,
const void *ref_donor =
NULL)
9077 : reffed_ptr(
m, ref_donor) {
9081 static ExtensionRange
get() {
9083 return ExtensionRange(
m, &
m);
9087 class ReservedRange :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9089 ReservedRange(const ::upb::MessageDef*
m,
const void *ref_donor =
NULL)
9090 : reffed_ptr(
m, ref_donor) {
9094 static ReservedRange
get() {
9096 return ReservedRange(
m, &
m);
9104 : reffed_ptr(
m, ref_donor) {
9114 class EnumOptions :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9117 : reffed_ptr(
m, ref_donor) {
9130 : reffed_ptr(
m, ref_donor) {
9140 class EnumValueOptions :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9143 : reffed_ptr(
m, ref_donor) {
9156 : reffed_ptr(
m, ref_donor) {
9165 class Label :
public ::upb::reffed_ptr<const ::upb::EnumDef> {
9167 Label(const ::upb::EnumDef* e,
const void *ref_donor =
NULL)
9168 : reffed_ptr(e, ref_donor) {
9171 static Label
get() {
9173 return Label(e, &e);
9177 class Type :
public ::upb::reffed_ptr<const ::upb::EnumDef> {
9179 Type(const ::upb::EnumDef* e,
const void *ref_donor =
NULL)
9180 : reffed_ptr(e, ref_donor) {
9190 class FieldOptions :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9193 : reffed_ptr(
m, ref_donor) {
9202 class CType :
public ::upb::reffed_ptr<const ::upb::EnumDef> {
9204 CType(const ::upb::EnumDef* e,
const void *ref_donor =
NULL)
9205 : reffed_ptr(e, ref_donor) {
9208 static CType
get() {
9210 return CType(e, &e);
9214 class JSType :
public ::upb::reffed_ptr<const ::upb::EnumDef> {
9216 JSType(const ::upb::EnumDef* e,
const void *ref_donor =
NULL)
9217 : reffed_ptr(e, ref_donor) {
9220 static JSType
get() {
9222 return JSType(e, &e);
9230 : reffed_ptr(
m, ref_donor) {
9243 : reffed_ptr(
m, ref_donor) {
9253 class FileOptions :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9256 : reffed_ptr(
m, ref_donor) {
9265 class OptimizeMode :
public ::upb::reffed_ptr<const ::upb::EnumDef> {
9267 OptimizeMode(const ::upb::EnumDef* e,
const void *ref_donor =
NULL)
9268 : reffed_ptr(e, ref_donor) {
9271 static OptimizeMode
get() {
9273 return OptimizeMode(e, &e);
9278 class MessageOptions :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9281 : reffed_ptr(
m, ref_donor) {
9294 : reffed_ptr(
m, ref_donor) {
9304 class MethodOptions :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9307 : reffed_ptr(
m, ref_donor) {
9320 : reffed_ptr(
m, ref_donor) {
9333 : reffed_ptr(
m, ref_donor) {
9343 class ServiceOptions :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9346 : reffed_ptr(
m, ref_donor) {
9356 class SourceCodeInfo :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9359 : reffed_ptr(
m, ref_donor) {
9368 class Location :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9370 Location(const ::upb::MessageDef*
m,
const void *ref_donor =
NULL)
9371 : reffed_ptr(
m, ref_donor) {
9375 static Location
get() {
9377 return Location(
m, &
m);
9385 : reffed_ptr(
m, ref_donor) {
9394 class NamePart :
public ::upb::reffed_ptr<const ::upb::MessageDef> {
9396 NamePart(const ::upb::MessageDef*
m,
const void *ref_donor =
NULL)
9397 : reffed_ptr(
m, ref_donor) {
9401 static NamePart
get() {
9403 return NamePart(
m, &
m);
9419 #ifndef UPB_DECODER_INT_H_
9420 #define UPB_DECODER_INT_H_
9436 #ifndef UPB_DECODER_H_
9437 #define UPB_DECODER_H_
9445 class DecoderMethod;
9446 class DecoderMethodOptions;
9463 #define UPB_DECODER_MAX_RESIDUAL_BYTES 14
9470 class upb::pb::DecoderMethodOptions {
9474 explicit DecoderMethodOptions(
const Handlers* dest_handlers);
9479 void set_lazy(
bool lazy);
9481 struct upb_pbdecodermethodopts {
9491 class upb::pb::DecoderMethod {
9499 const Handlers* dest_handlers()
const;
9502 const BytesHandler* input_handler()
const;
9505 bool is_native()
const;
9509 static reffed_ptr<const DecoderMethod>
New(
const DecoderMethodOptions& opts);
9521 #define UPB_PB_DECODER_SIZE 4416
9527 class upb::pb::Decoder {
9534 static Decoder* Create(Environment* env,
const DecoderMethod*
method,
9538 const DecoderMethod*
method()
const;
9550 uint64_t BytesParsed()
const;
9559 size_t max_nesting()
const;
9560 bool set_max_nesting(
size_t max);
9580 class upb::pb::CodeCache {
9592 bool allow_jit()
const;
9596 bool set_allow_jit(
bool allow);
9606 const DecoderMethod *GetDecoderMethod(
const DecoderMethodOptions& opts);
9648 const upb_pbdecodermethodopts *opts,
const void *owner);
9666 inline Decoder* Decoder::Create(Environment* env,
const DecoderMethod*
m,
9676 inline uint64_t Decoder::BytesParsed()
const {
9679 inline size_t Decoder::max_nesting()
const {
9682 inline bool Decoder::set_max_nesting(
size_t max) {
9687 inline DecoderMethodOptions::DecoderMethodOptions(
const Handlers*
h) {
9690 inline void DecoderMethodOptions::set_lazy(
bool lazy) {
9694 inline const Handlers* DecoderMethod::dest_handlers()
const {
9697 inline const BytesHandler* DecoderMethod::input_handler()
const {
9700 inline bool DecoderMethod::is_native()
const {
9705 const DecoderMethodOptions &opts) {
9707 return reffed_ptr<const DecoderMethod>(
m, &
m);
9710 inline CodeCache::CodeCache() {
9713 inline CodeCache::~CodeCache() {
9716 inline bool CodeCache::allow_jit()
const {
9719 inline bool CodeCache::set_allow_jit(
bool allow) {
9722 inline const DecoderMethod *CodeCache::GetDecoderMethod(
9723 const DecoderMethodOptions& opts) {
9753 #define T(type) OP_PARSE_ ## type = UPB_DESCRIPTOR_TYPE_ ## type
9754 T(DOUBLE),
T(FLOAT),
T(INT64),
T(UINT64),
T(INT32),
T(FIXED64),
T(FIXED32),
9755 T(BOOL),
T(UINT32),
T(SFIXED32),
T(SFIXED64),
T(SINT32),
T(SINT64),
9796 #define OP_MAX OP_HALT
9826 uint32_t *bytecode_end;
9828 #ifdef UPB_USE_JIT_X64
9846 #define UPB_DECODER_MAX_NESTING 64
9866 const uint32_t *
base;
9919 const uint32_t *pc, *last;
9925 const char *delim_end;
9928 const char *data_end;
9931 uint64_t bufstart_ofs;
9944 const char *buf_param;
9950 const uint32_t **callstack;
9955 #ifdef UPB_USE_JIT_X64
9960 const void *saved_rsp;
9997 #define LABEL_DISPATCH 0
10001 #define DISPATCH_ENDMSG 0
10005 #define NO_WIRE_TYPE 0xff
10022 return (ofs << 16) | (wt2 << 8) | wt1;
10026 uint8_t *wt1, uint8_t *wt2) {
10039 #define DECODE_OK -1
10040 #define DECODE_MISMATCH -2
10041 #define DECODE_ENDGROUP -3
10043 #define CHECK_RETURN(x) { int32_t ret = x; if (ret >= 0) return ret; }
10053 #ifndef UPB_VARINT_DECODER_H_
10054 #define UPB_VARINT_DECODER_H_
10057 #include <stdint.h>
10058 #include <string.h>
10064 #define UPB_MAX_WIRE_TYPE 5
10067 #define UPB_PB_VARINT_MAX_LEN 10
10076 return (
n >> 1) ^ -(int32_t)(
n & 1);
10079 return (
n >> 1) ^ -(int64_t)(
n & 1);
10106 #define UPB_VARINT_DECODER_CHECK2(name, decode_max8_function) \
10107 UPB_INLINE upb_decoderet upb_vdecode_check2_ ## name(const char *_p) { \
10108 uint8_t *p = (uint8_t*)_p; \
10110 if ((*p & 0x80) == 0) { \
10112 return upb_decoderet_make(_p + 1, *p & 0x7fU); \
10114 r = upb_decoderet_make(_p + 2, (*p & 0x7fU) | ((*(p + 1) & 0x7fU) << 7)); \
10115 if ((*(p + 1) & 0x80) == 0) { \
10120 return decode_max8_function(r); \
10125 #undef UPB_VARINT_DECODER_CHECK2
10130 if (
sizeof(
long) == 8)
10131 return upb_vdecode_check2_branch64(
p);
10133 return upb_vdecode_check2_branch32(
p);
10141 int high_bit = 63 - __builtin_clzll(
val);
10144 uint64_t tmp =
val;
10145 while(tmp >>= 1) high_bit++;
10147 return val == 0 ? 1 : high_bit / 8 + 1;
10156 if (
val == 0) {
buf[0] = 0;
return 1; }
10159 uint8_t
byte =
val & 0x7fU;
10161 if (
val)
byte |= 0x80U;
10199 #ifndef UPB_ENCODER_H_
10200 #define UPB_ENCODER_H_
10213 #define UPB_PBENCODER_MAX_NESTING 100
10221 #define UPB_PB_ENCODER_SIZE 768
10225 class upb::pb::Encoder {
10229 static Encoder* Create(Environment* env,
const Handlers* handlers,
10236 static reffed_ptr<const Handlers> NewHandlers(
const MessageDef* msg);
10249 const void *owner);
10260 inline Encoder* Encoder::Create(Environment* env,
const Handlers* handlers,
10267 inline reffed_ptr<const Handlers> Encoder::NewHandlers(
10268 const upb::MessageDef *md) {
10270 return reffed_ptr<const Handlers>(
h, &
h);
10301 #include <stdbool.h>
10320 inline bool LoadDescriptor(
const char*
buf,
size_t n,
Status* status,
10321 std::vector<reffed_ptr<FileDef> >* files) {
10324 if (parsed_files) {
10325 FileDef**
p = parsed_files;
10327 files->push_back(reffed_ptr<FileDef>(*
p, &parsed_files));
10330 free(parsed_files);
10338 template <
typename T>
10339 bool LoadDescriptor(
const T&
desc,
Status* status,
10340 std::vector<reffed_ptr<FileDef> >* files) {
10341 return LoadDescriptor(
desc.c_str(),
desc.size(), status, files);
10355 #ifndef UPB_TEXT_H_
10356 #define UPB_TEXT_H_
10371 class upb::pb::TextPrinter {
10375 static TextPrinter *Create(Environment *env,
const upb::Handlers *handlers,
10378 void SetSingleLineMode(
bool single_line);
10384 static reffed_ptr<const Handlers> NewHandlers(
const MessageDef* md);
10398 const void *owner);
10406 inline TextPrinter *TextPrinter::Create(Environment *env,
10407 const upb::Handlers *handlers,
10411 inline void TextPrinter::SetSingleLineMode(
bool single_line) {
10417 inline reffed_ptr<const Handlers> TextPrinter::NewHandlers(
10418 const MessageDef *md) {
10420 return reffed_ptr<const Handlers>(
h, &
h);
10435 #ifndef UPB_JSON_PARSER_H_
10436 #define UPB_JSON_PARSER_H_
10443 class ParserMethod;
10458 #define UPB_JSON_PARSER_SIZE 5712
10464 class upb::json::Parser {
10466 static Parser* Create(Environment* env,
const ParserMethod*
method,
10467 const SymbolTable*
symtab,
10470 BytesSink*
input();
10476 class upb::json::ParserMethod {
10482 static reffed_ptr<const ParserMethod>
New(
const upb::MessageDef* md);
10487 const Handlers* dest_handlers()
const;
10490 const BytesHandler* input_handler()
const;
10508 const void* owner);
10523 inline Parser* Parser::Create(Environment* env,
const ParserMethod*
method,
10524 const SymbolTable*
symtab,
10533 inline const Handlers* ParserMethod::dest_handlers()
const {
10536 inline const BytesHandler* ParserMethod::input_handler()
const {
10541 const MessageDef* md) {
10543 return reffed_ptr<const ParserMethod>(
m, &
m);
10559 #ifndef UPB_JSON_TYPED_PRINTER_H_
10560 #define UPB_JSON_TYPED_PRINTER_H_
10576 #define UPB_JSON_PRINTER_SIZE 192
10581 class upb::json::Printer {
10583 static Printer* Create(Environment* env,
const upb::Handlers* handlers,
10593 static reffed_ptr<const Handlers> NewHandlers(
const upb::MessageDef* md,
10594 bool preserve_proto_fieldnames);
10611 bool preserve_fieldnames,
10612 const void *owner);
10620 inline Printer* Printer::Create(Environment* env,
const upb::Handlers* handlers,
10625 inline reffed_ptr<const Handlers> Printer::NewHandlers(
10626 const upb::MessageDef *md,
bool preserve_proto_fieldnames) {
10628 md, preserve_proto_fieldnames, &
h);
10629 return reffed_ptr<const Handlers>(
h, &
h);
10639 #undef UPB_FIELD_AT
10640 #undef UPB_READ_ONEOF
10641 #undef UPB_WRITE_ONEOF
UPB_INLINE google_protobuf_FileDescriptorProto ** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_arena *arena)
const upb_handlers * upb_handlers_getsubhandlers(const upb_handlers *h, const upb_fielddef *f)
upb_value upb_inttable_pop(upb_inttable *t)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_objc_class_prefix(const upb_msgdef *m)
@ UPB_DESCRIPTOR_TYPE_BYTES
const upb_msglayout google_protobuf_EnumDescriptorProto_msginit
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
bool upb_strtable_resize(upb_strtable *t, size_t size_lg2, upb_alloc *a)
UPB_INLINE char * upb_gstrdup(const char *s)
const upb_enumdef * upbdefs_google_protobuf_FieldOptions_CType_get(const void *owner)
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto
bool upb_filedef_adddef(upb_filedef *f, upb_def *def, const void *ref_donor, upb_status *s)
UPB_INLINE struct google_protobuf_FileOptions * google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena)
struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto
const upb_refcounted * group
struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange
const upb_msgdef * msgdef
UPB_INLINE uintptr_t upb_intkey(uintptr_t key)
google_protobuf_FieldDescriptorProto_Label
const upb_msgdef * upb_oneofdef_containingtype(const upb_oneofdef *o)
void upb_refcounted_unref2(const upb_refcounted *r, upb_refcounted *from)
const UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg)
UPB_INLINE bool upbdefs_google_protobuf_UninterpretedOption_NamePart_is(const upb_msgdef *m)
const upb_msglayout google_protobuf_MessageOptions_msginit
UPB_BEGIN_EXTERN_C upb_deftype_t upb_def_type(const upb_def *d)
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg)
upb_errorspace upb_upberr
void * upb_startstr_handlerfunc(void *c, const void *hd, size_t size_hint)
upb_fieldtype_t upb_array_type(const upb_array *arr)
unsigned long long int UInt64
UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_strview value)
uint32_t upb_oneofdef_index(const upb_oneofdef *o)
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg)
UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_strview val, upb_arena *arena)
google_protobuf_FieldOptions_JSType
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg)
GLuint const GLchar * name
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_java_generic_services(const upb_msgdef *m)
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_new(upb_arena *arena)
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_arena *arena)
const UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg)
PyObject * FindOneofByName(PyDescriptorPool *self, PyObject *arg)
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len)
struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo
UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg)
const UPB_INLINE google_protobuf_EnumValueDescriptorProto *const * google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len)
google_protobuf_FileOptions_OptimizeMode
@ google_protobuf_FileOptions_CODE_SIZE
void upb_msg_oneof_begin(upb_msg_oneof_iter *iter, const upb_msgdef *m)
int32_t upb_pbdecoder_checktag_slow(upb_pbdecoder *d, uint64_t expected)
#define UPB_PB_VARINT_MAX_LEN
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg)
const char * upb_filedef_phpprefix(const upb_filedef *f)
void upb_refcounted_unref(const upb_refcounted *r, const void *owner)
void upb_symtab_begin(upb_symtab_iter *iter, const upb_symtab *s, upb_deftype_t type)
bool upb_handlers_setint32(upb_handlers *h, const upb_fielddef *f, upb_int32_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE char * google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len)
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation ** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_arena *arena)
const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit
bool upb_handlers_setstartstr(upb_handlers *h, const upb_fielddef *f, upb_startstr_handlerfunc *func, upb_handlerattr *attr)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_name(const upb_msgdef *m)
bool upb_int32_handlerfunc(void *c, const void *hd, int32_t val)
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_arena *arena)
UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg)
upb_value upb_inttable_iter_value(const upb_inttable_iter *i)
bool upb_pbcodecache_allowjit(const upb_pbcodecache *c)
UPB_INLINE bool upb_strtable_init(upb_strtable *table, upb_ctype_t ctype)
UPB_INLINE char * google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len)
@ UPB_DESCRIPTOR_TYPE_STRING
@ UPB_DESCRIPTOR_TYPE_SINT64
const upb_enumdef * upbdefs_google_protobuf_FieldDescriptorProto_Label_get(const void *owner)
int32_t upb_pbdecoder_decode_varint_slow(upb_pbdecoder *d, uint64_t *u64)
void swap(message_t &a, message_t &b) ZMQ_NOTHROW
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg)
google_protobuf_FieldDescriptorProto_Type
const upb_msgdef * upbdefs_google_protobuf_FieldOptions_get(const void *owner)
UPB_INLINE google_protobuf_ServiceDescriptorProto ** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_BEGIN_EXTERN_C upb_json_printer * upb_json_printer_create(upb_env *e, const upb_handlers *h, upb_bytessink *output)
void upb_refcounted_ref(const upb_refcounted *r, const void *owner)
const upb_byteshandler * upb_pbdecodermethod_inputhandler(const upb_pbdecodermethod *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodDescriptorProto_f_name(const upb_msgdef *m)
void upb_inttable_iter_setdone(upb_inttable_iter *i)
#define UPB_DECLARE_DERIVED_TYPE(cppname, cppbase, cname, cbase)
UPB_INLINE google_protobuf_FieldOptions_CType google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg)
uint32_t upb_fielddef_number(const upb_fielddef *f)
upb_msgfactory * upb_msgfactory_new(const upb_symtab *symtab)
@ UPB_HANDLER_STARTSUBMSG
bool upb_handlers_freeze(upb_handlers *const *handlers, int n, upb_status *s)
const void * upb_handlerattr_returnclosuretype(const upb_handlerattr *attr)
UPB_INLINE upb_strview * google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
bool upb_fielddef_setdefaultstr(upb_fielddef *f, const void *str, size_t len, upb_status *s)
size_t upb_arena_bytesallocated(const upb_arena *a)
bool upb_oneofdef_addfield(upb_oneofdef *o, upb_fielddef *f, const void *ref_donor, upb_status *s)
bool upb_byteshandler_setendstr(upb_byteshandler *h, upb_endfield_handlerfunc *func, void *d)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t *len)
bool upb_fielddef_issubmsg(const upb_fielddef *f)
upb_decoderet upb_vdecode_max8_branch64(upb_decoderet r)
UPB_INLINE char * google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len)
upb_syntax_t upb_msgdef_syntax(const upb_msgdef *m)
struct google_protobuf_MethodOptions google_protobuf_MethodOptions
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_f_name(const upb_msgdef *m)
bool upb_pbdecodermethod_isnative(const upb_pbdecodermethod *m)
bool upb_handlers_setendmsg(upb_handlers *h, upb_endmsg_handlerfunc *func, upb_handlerattr *attr)
@ UPB_WELLKNOWN_STRINGVALUE
void upb_arena_init2(upb_arena *a, void *mem, size_t n, upb_alloc *alloc)
@ UPB_DESCRIPTOR_TYPE_FIXED32
UPB_INLINE bool upbdefs_google_protobuf_ServiceDescriptorProto_is(const upb_msgdef *m)
bool upb_msg_field_done(const upb_msg_field_iter *iter)
bool upb_fielddef_setsubdefname(upb_fielddef *f, const char *name, upb_status *s)
UPB_INLINE google_protobuf_OneofDescriptorProto ** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
upb_descriptortype_t upb_fielddef_descriptortype(const upb_fielddef *f)
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_deprecated(const upb_msgdef *m)
UPB_INLINE google_protobuf_MethodOptions_IdempotencyLevel google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg)
@ google_protobuf_FieldDescriptorProto_TYPE_DOUBLE
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_weak_dependency(const upb_msgdef *m)
bool upb_inttable_insertptr2(upb_inttable *t, const void *key, upb_value val, upb_alloc *a)
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg)
bool upb_byteshandler_setstartstr(upb_byteshandler *h, upb_startstr_handlerfunc *func, void *d)
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value)
upb_map * upb_map_new(upb_fieldtype_t ktype, upb_fieldtype_t vtype, upb_arena *a)
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Label value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodDescriptorProto_f_client_streaming(const upb_msgdef *m)
const char * upb_enumdef_name(const upb_enumdef *e)
UPB_INLINE google_protobuf_MethodDescriptorProto ** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg)
UPB_INLINE void upb_sink_reset(upb_sink *s, const upb_handlers *h, void *c)
@ UPB_WIRE_TYPE_START_GROUP
bool upb_msgdef_lookupname(const upb_msgdef *m, const char *name, size_t len, const upb_fielddef **f, const upb_oneofdef **o)
@ UPB_DESCRIPTOR_TYPE_FLOAT
UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg)
bool upb_enumdef_setdefault(upb_enumdef *e, int32_t val, upb_status *s)
const UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg)
upb_msgval upb_array_get(const upb_array *arr, size_t i)
UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value)
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg)
bool upb_fielddef_packed(const upb_fielddef *f)
const upb_pbdecodermethod * upb_pbcodecache_getdecodermethod(upb_pbcodecache *c, const upb_pbdecodermethodopts *opts)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldOptions_f_deprecated(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_csharp_namespace(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upb_msgdef_ntofz(const upb_msgdef *m, const char *name)
std::unique_ptr< io::Tokenizer > input_
const UPB_INLINE google_protobuf_DescriptorProto *const * google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg, size_t *len)
const upb_fielddef * fielddef
UPB_INLINE upb_value upb_value_float(float cval)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_enum_type(const upb_msgdef *m)
int32_t upb_pbdecoder_resume(upb_pbdecoder *d, void *p, const char *buf, size_t size, const upb_bufhandle *handle)
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_name(const upb_msgdef *m)
bool upb_msg_clearfield(upb_msg *msg, int field_index, const upb_msglayout *l)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_f_positive_int_value(const upb_msgdef *m)
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_ExtensionRange_f_start(const upb_msgdef *m)
UPB_INLINE char * google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len)
bool upb_msgdef_setsyntax(upb_msgdef *m, upb_syntax_t syntax)
void upb_bufsink_free(upb_bufsink *sink)
const UPB_INLINE google_protobuf_DescriptorProto *const * google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_INLINE struct google_protobuf_OneofOptions * google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_arena *arena)
bool upb_fielddef_checkintfmt(int32_t fmt)
void upb_fielddef_setdefaultdouble(upb_fielddef *f, double val)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_extendee(const upb_msgdef *m)
bool upb_strtable_init2(upb_strtable *table, upb_ctype_t ctype, upb_alloc *a)
UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg)
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_strview value)
uint128 operator*(const uint128 &lhs, const uint128 &rhs)
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE bool upbdefs_google_protobuf_FieldDescriptorProto_Type_is(const upb_enumdef *e)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorSet_f_file(const upb_msgdef *m)
#define ACCESSORS(name, membername, ctype)
GLenum GLuint GLenum GLsizei length
UPB_INLINE void upb_gfree(void *ptr)
UPB_INLINE int64_t upb_zzdec_64(uint64_t n)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg)
#define UPB_DECLARE_DEF_TYPE(cppname, lower, upper)
uint32_t upb_fielddef_index(const upb_fielddef *f)
@ UPB_WELLKNOWN_UNSPECIFIED
UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs, size_t elem_size, upb_fieldtype_t type, const void *value, upb_arena *arena)
ROSCPP_DECL bool get(const std::string &key, bool &b)
upb_errorspace * error_space_
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_name(const upb_msgdef *m)
bool upb_inttable_done(const upb_inttable_iter *i)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_f_negative_int_value(const upb_msgdef *m)
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE char * upb_tabstr(upb_tabkey key, uint32_t *len)
void upb_strtable_uninit2(upb_strtable *table, upb_alloc *a)
UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg)
static PyObject * GetJsonName(PyBaseDescriptor *self, void *closure)
UPB_INLINE bool upb_sink_startstr(upb_sink *s, upb_selector_t sel, size_t size_hint, upb_sink *sub)
const UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *const * google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto *msg, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumValueDescriptorProto_f_options(const upb_msgdef *m)
bool upb_uint32_handlerfunc(void *c, const void *hd, uint32_t val)
UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg)
UPB_INLINE google_protobuf_FileOptions_OptimizeMode google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg)
UPB_INLINE void upb_bufhandle_uninit(upb_bufhandle *h)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_arena *arena)
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
void upb_mapiter_next(upb_mapiter *i)
UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg)
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg, size_t *len)
bool upb_handlers_setendsubmsg(upb_handlers *h, const upb_fielddef *f, upb_endfield_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE upb_strview * google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
void upb_symtab_next(upb_symtab_iter *iter)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_php_class_prefix(const upb_msgdef *m)
bool upb_enumdef_freeze(upb_enumdef *e, upb_status *status)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_NamePart_f_name_part(const upb_msgdef *m)
#define PTR_AT(msg, ofs, type)
void upb_refcounted_visit(const upb_refcounted *r, const upb_refcounted *subobj, void *closure)
upb_json_parser * upb_json_parser_create(upb_arena *arena, const upb_json_parsermethod *method, const upb_symtab *symtab, upb_sink output, upb_status *status, bool ignore_json_unknown)
std::unique_ptr< Arena > arena_
const upb_fielddef * upb_msgdef_ntof(const upb_msgdef *m, const char *name, size_t len)
static void checkpoint(upb_pbdecoder *d)
const upb_handlers * upb_json_printer_newhandlers(const upb_msgdef *md, bool preserve_fieldnames, const void *owner)
void upb_msg_oneof_iter_setdone(upb_msg_oneof_iter *iter)
void upb_status_copy(upb_status *to, const upb_status *from)
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
const UPB_INLINE google_protobuf_MessageOptions * google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg)
@ google_protobuf_FieldDescriptorProto_TYPE_SFIXED64
bool upb_enumdef_addval(upb_enumdef *e, const char *name, int32_t num, upb_status *status)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumOptions_f_deprecated(const upb_msgdef *m)
upb_value upb_strtable_iter_value(const upb_strtable_iter *i)
void upb_inttable_uninit2(upb_inttable *table, upb_alloc *a)
#define UPB_SIZE(size32, size64)
UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg)
void upb_handlerfree(void *d)
const upb_def * upb_symtab_resolve(const upb_symtab *s, const char *base, const char *sym)
static PyObject * CopyFrom(CMessage *self, PyObject *arg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldOptions_f_weak(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_options(const upb_msgdef *m)
void upb_msg_field_iter_setdone(upb_msg_field_iter *iter)
size_t upb_array_size(const upb_array *arr)
#define UPB_DISALLOW_POD_OPS(class_name, full_class_name)
UPB_INLINE char * google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len)
bool upb_fielddef_hassubdef(const upb_fielddef *f)
@ google_protobuf_FieldDescriptorProto_TYPE_ENUM
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_strview value)
UPB_INLINE bool upbdefs_google_protobuf_FieldDescriptorProto_Label_is(const upb_enumdef *e)
bool upb_msgdef_addoneof(upb_msgdef *m, upb_oneofdef *o, const void *ref_donor, upb_status *s)
UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg)
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len)
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_strview value)
UPB_INLINE struct google_protobuf_EnumValueOptions * google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena)
upb_msg * upb_msg_new(const upb_msglayout *l, upb_arena *a)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumValueOptions_f_uninterpreted_option(const upb_msgdef *m)
void upb_refcounted_ref2(const upb_refcounted *r, upb_refcounted *from)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_f_identifier_value(const upb_msgdef *m)
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value)
bool upb_startmsg_handlerfunc(void *c, const void *)
UPB_INLINE int32_t const * google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
const upb_filedef * upb_def_file(const upb_def *d)
UPB_INLINE size_t upb_vencode64(uint64_t val, char *buf)
UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg)
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_new(upb_arena *arena)
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value)
void upb_refcounted_checkref(const upb_refcounted *r, const void *owner)
GLuint GLsizei const GLchar * label
void * upb_pbdecoder_startbc(void *closure, const void *pc, size_t size_hint)
UPB_INLINE char * google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len)
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE size_t upb_strtable_count(const upb_strtable *t)
bool upb_filedef_setphpprefix(upb_filedef *f, const char *phpprefix, upb_status *s)
void upb_arena_setmaxblocksize(upb_arena *a, size_t size)
UPB_INLINE struct google_protobuf_OneofDescriptorProto * google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto *msg, upb_arena *arena)
UPB_INLINE bool upb_strtable_remove(upb_strtable *t, const char *key, upb_value *v)
const upb_msgdef * upb_symtab_lookupmsg2(const upb_symtab *s, const char *sym, size_t len)
UPB_INLINE bool upb_msgdef_lookupnamez(const upb_msgdef *m, const char *name, const upb_fielddef **f, const upb_oneofdef **o)
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_new(upb_arena *arena)
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value)
@ UPB_DESCRIPTOR_TYPE_INT64
UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value)
const UPB_INLINE google_protobuf_MethodDescriptorProto *const * google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len)
bool upb_fielddef_setfullname(upb_fielddef *f, const char *fullname, upb_status *s)
const uint8_t upb_desctype_to_fieldtype[]
void upb_env_init2(upb_env *e, void *mem, size_t n, upb_alloc *alloc)
UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg)
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg)
struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions
size_t upb_inttable_count(const upb_inttable *t)
void AddFile(const std::string &filename, const std::string &data)
const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit
upb_oneofdef * upb_oneofdef_new(const void *owner)
UPB_INLINE char * google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len)
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE bool upb_strtable_insert2(upb_strtable *t, const char *key, size_t len, upb_value val)
UPB_INLINE uint64_t upb_vencode32(uint32_t val)
uint64_t upb_pbdecoder_bytesparsed(const upb_pbdecoder *d)
bool upb_enumdef_ntoi(const upb_enumdef *e, const char *name, size_t len, int32_t *num)
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_new(upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_reserved_range(const upb_msgdef *m)
void upb_fielddef_setisextension(upb_fielddef *f, bool is_extension)
#define UPB_PB_ENCODER_SIZE
UPB_BEGIN_EXTERN_C upb_symtab * upb_symtab_new()
UPB_INLINE uint32_t upb_inthash(uintptr_t key)
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value)
UPB_INLINE bool upbdefs_google_protobuf_EnumOptions_is(const upb_msgdef *m)
bool upb_refcounted_freeze(upb_refcounted *const *roots, int n, upb_status *s, int maxdepth)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_oneof_decl(const upb_msgdef *m)
#define UPB_JSON_PRINTER_SIZE
struct _upb_tabent upb_tabent
UPB_INLINE char * google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len)
@ UPB_WIRE_TYPE_DELIMITED
void upb_enum_next(upb_enum_iter *iter)
UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg)
UPB_INLINE bool upbdefs_google_protobuf_EnumDescriptorProto_is(const upb_msgdef *m)
bool upb_fielddef_haspresence(const upb_fielddef *f)
const upb_msgdef * upbdefs_google_protobuf_EnumDescriptorProto_get(const void *owner)
UPB_INLINE upb_strview * google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
bool upb_filedef_setphpnamespace(upb_filedef *f, const char *phpnamespace, upb_status *s)
#define UPB_PRIVATE_FOR_CPP
bool upb_msg_oneof_done(const upb_msg_oneof_iter *iter)
const char * upb_msg_getunknown(const upb_msg *msg, size_t *len)
UPB_INLINE google_protobuf_FieldDescriptorProto_Label google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg)
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg, size_t *len)
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value)
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg)
void upb_inttable_packedsize(const upb_inttable *t, size_t *size)
void upb_cleanup_func(void *ud)
UPB_INLINE void * upb_malloc(upb_alloc *alloc, size_t size)
const char * upb_fielddef_subdefname(const upb_fielddef *f)
UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_SourceCodeInfo_Location_f_path(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumOptions_f_allow_alias(const upb_msgdef *m)
upb_strtable * upb_strtable_pack(const upb_strtable *t, void *p, size_t *ofs, size_t size)
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_enum_type(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_message_type(const upb_msgdef *m)
UPB_INLINE struct google_protobuf_ServiceDescriptorProto * google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
UPB_INLINE bool upb_inttable_init(upb_inttable *table, upb_ctype_t ctype)
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len)
google_protobuf_FieldOptions_CType
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumValueOptions_f_deprecated(const upb_msgdef *m)
UPB_INLINE upb_strview * google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_ReservedRange_f_end(const upb_msgdef *m)
#define UPB_STRING_SELECTOR
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldOptions_f_uninterpreted_option(const upb_msgdef *m)
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value)
const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit
UPB_INLINE char * google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len)
const char * upb_filedef_name(const upb_filedef *f)
bool upb_handlers_addcleanup(upb_handlers *h, void *p, upb_handlerfree *hfree)
#define UPB_REFCOUNTED_CMETHODS(type, upcastfunc)
bool upb_bool_handlerfunc(void *c, const void *hd, bool val)
GLsizei const GLchar *const * string
@ UPB_WELLKNOWN_FLOATVALUE
UPB_INLINE struct google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena)
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MessageOptions_f_deprecated(const upb_msgdef *m)
upb_alloc upb_alloc_global
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_public_dependency(const upb_msgdef *m)
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_parsenew(upb_strview buf, upb_arena *arena)
void upb_strtable_begin(upb_strtable_iter *i, const upb_strtable *t)
bool upb_error_func(void *ud, const upb_status *status)
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END if(!upb_strtable_init(&intern->table, UPB_CTYPE_UINT64))
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MessageOptions_f_no_standard_descriptor_accessor(const upb_msgdef *m)
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value)
google_protobuf_MethodOptions_IdempotencyLevel
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_new(upb_arena *arena)
upb_handlertype_t upb_handlers_getprimitivehandlertype(const upb_fielddef *f)
UPB_INLINE bool upb_strtable_lookup(const upb_strtable *t, const char *key, upb_value *v)
static PyObject * Add(PyObject *self, PyObject *file_descriptor_proto)
@ UPB_WELLKNOWN_FIELDMASK
void upb_msg_set(upb_msg *msg, int field_index, upb_msgval val, const upb_msglayout *l)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_ServiceDescriptorProto_f_method(const upb_msgdef *m)
bool upb_oneofdef_setname(upb_oneofdef *o, const char *name, upb_status *s)
UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg)
@ UPB_WELLKNOWN_UINT32VALUE
int32_t upb_fielddef_defaultint32(const upb_fielddef *f)
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
UPB_INLINE bool _upb_has_field(const void *msg, size_t idx)
void upb_env_reporterrorsto(upb_env *e, upb_status *s)
UPB_INLINE size_t upb_table_size(const upb_table *t)
UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg)
UPB_INLINE void * upb_grealloc(void *ptr, size_t oldsize, size_t size)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_arena *arena)
void upb_fielddef_setdescriptortype(upb_fielddef *f, int type)
bool upb_arena_addcleanup(upb_arena *a, upb_cleanup_func *func, void *ud)
UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg)
const upb_msglayout google_protobuf_FieldOptions_msginit
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg)
bool upb_handlers_getattr(const upb_handlers *h, upb_selector_t s, upb_handlerattr *attr)
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
bool upb_handlers_getselector(const upb_fielddef *f, upb_handlertype_t type, upb_selector_t *s)
UPB_INLINE void upb_strtable_uninit(upb_strtable *table)
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto *msg, size_t *len)
void upb_msgdef_setmapentry(upb_msgdef *m, bool map_entry)
UPB_INLINE opcode getop(uint32_t instr)
void * upb_pbdecoder_startjit(void *closure, const void *hd, size_t size_hint)
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_new(upb_arena *arena)
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_new(upb_arena *arena)
UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg)
const UPB_INLINE void * upb_bufhandle_objtype(const upb_bufhandle *h)
static int32_t dispatch(upb_pbdecoder *d)
UPB_INLINE google_protobuf_FieldDescriptorProto_Type google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE char * google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len)
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value)
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg)
const upb_handlers * upb_handlers_getsubhandlers_sel(const upb_handlers *h, upb_selector_t sel)
TypeWithSize< 4 >::Int Int32
UPB_INLINE bool upb_sink_startseq(upb_sink *s, upb_selector_t sel, upb_sink *sub)
size_t upb_string_handlerfunc(void *c, const void *hd, const char *buf, size_t n, const upb_bufhandle *handle)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg)
const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_parsenew(upb_strview buf, upb_arena *arena)
const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_number(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg)
static int Func(int i, int j)
@ UPB_WELLKNOWN_BOOLVALUE
UPB_INLINE void upb_inttable_uninit(upb_inttable *table)
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_java_string_check_utf8(const upb_msgdef *m)
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg)
struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldOptions_f_lazy(const upb_msgdef *m)
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_new(upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_NamePart_f_is_extension(const upb_msgdef *m)
const upb_enumdef * upbdefs_google_protobuf_FieldDescriptorProto_Type_get(const void *owner)
const upb_msglayout google_protobuf_FileDescriptorSet_msginit
UPB_INLINE bool upb_sink_endmsg(upb_sink *s, upb_status *status)
void upb_msgfactory_free(upb_msgfactory *f)
const upb_handlers * handlers
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg)
@ google_protobuf_FieldOptions_STRING
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodDescriptorProto_f_output_type(const upb_msgdef *m)
UPB_INLINE bool upb_filedef_addmsg(upb_filedef *f, upb_msgdef *m, const void *ref_donor, upb_status *s)
void upb_inttable_begin(upb_inttable_iter *i, const upb_inttable *t)
bool upb_pbcodecache_setallowjit(upb_pbcodecache *c, bool allow)
UPB_INLINE upb_arena * upb_env_arena(upb_env *e)
bool upb_fielddef_isseq(const upb_fielddef *f)
UPB_INLINE struct google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_arena *arena)
void upb_handlerattr_init(upb_handlerattr *attr)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodDescriptorProto_f_server_streaming(const upb_msgdef *m)
const char * kPbDecoderSubmessageTooLong
bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val, upb_msgval *valremoved)
const UPB_INLINE google_protobuf_EnumDescriptorProto *const * google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg, size_t *len)
struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation
UPB_INLINE int32_t const * google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
UPB_INLINE struct google_protobuf_MessageOptions * google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_arena *arena)
@ UPB_DESCRIPTOR_TYPE_ENUM
void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args)
const UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg)
google_protobuf_FieldOptions_JSType
@ google_protobuf_FieldDescriptorProto_TYPE_FIXED64
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumOptions_f_uninterpreted_option(const upb_msgdef *m)
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions *value)
bool upb_inttable_push2(upb_inttable *t, upb_value val, upb_alloc *a)
#define UPB_ARENA_BLOCK_OVERHEAD
UPB_INLINE upb_strview * google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t *len)
static uint32_t idx(tarjan *t, const upb_refcounted *r)
UPB_INLINE bool upbdefs_google_protobuf_FileDescriptorProto_is(const upb_msgdef *m)
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value)
@ google_protobuf_MethodOptions_NO_SIDE_EFFECTS
const upb_msglayout google_protobuf_EnumOptions_msginit
UPB_INLINE bool upbdefs_google_protobuf_FieldOptions_is(const upb_msgdef *m)
static bool endseq(void *closure, const void *handler_data)
bool upb_msg_getscalarhandlerdata(const upb_handlers *h, upb_selector_t s, upb_fieldtype_t *type, size_t *offset, int32_t *hasbit)
UPB_INLINE int upb_value_size(uint64_t val)
struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto
@ UPB_WIRE_TYPE_END_GROUP
bool upb_inttable_remove(upb_inttable *t, uintptr_t key, upb_value *val)
void upb_pbdecoder_reset(upb_pbdecoder *d)
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg)
@ google_protobuf_MethodOptions_IDEMPOTENT
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg)
UPB_END_EXTERN_C typedef upb_strtable_iter upb_enum_iter
const char * upb_fielddef_name(const upb_fielddef *f)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg)
UPB_INLINE upb_strview * google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena)
UPB_BEGIN_EXTERN_C void upb_arena_init(upb_arena *a)
const upb_msgdef * upbdefs_google_protobuf_MessageOptions_get(const void *owner)
upb_fieldtype_t upb_map_valuetype(const upb_map *map)
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value)
bool upb_uint64_handlerfunc(void *c, const void *hd, uint64_t val)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_extension(const upb_msgdef *m)
upb_errorspace * upb_status_errspace(const upb_status *status)
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange ** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t *len)
UPB_INLINE struct google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto *msg, upb_arena *arena)
UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg)
UPB_INLINE bool upbdefs_google_protobuf_ServiceOptions_is(const upb_msgdef *m)
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value)
@ google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL
upb_errorspace upb_errnoerr
void upb_status_seterrmsg(upb_status *status, const char *msg)
const UPB_INLINE char * upb_bufhandle_buf(const upb_bufhandle *h)
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_strview value)
bool upb_strtable_done(const upb_strtable_iter *i)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_SourceCodeInfo_Location_f_leading_comments(const upb_msgdef *m)
FloatingPoint< double > Double
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value)
bool upb_fielddef_isstring(const upb_fielddef *f)
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_arena *arena)
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value)
GLboolean GLboolean GLboolean b
UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg)
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value)
@ google_protobuf_FieldDescriptorProto_LABEL_REQUIRED
void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len)
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
void upb_refcounted_donateref(const upb_refcounted *r, const void *from, const void *to)
TypeWithSize< 4 >::UInt UInt32
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value)
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena)
google_protobuf_MethodOptions_IdempotencyLevel
bool upb_refcounted_isfrozen(const upb_refcounted *r)
const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit
struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto
UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg)
UPB_INLINE char * google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len)
UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena)
void upb_fielddef_settype(upb_fielddef *f, upb_fieldtype_t type)
bool upb_strtable_insert3(upb_strtable *t, const char *key, size_t len, upb_value val, upb_alloc *a)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MessageOptions_f_message_set_wire_format(const upb_msgdef *m)
@ UPB_WELLKNOWN_BYTESVALUE
bool upb_fielddef_enumhasdefaultstr(const upb_fielddef *f)
UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_strview value)
UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg)
UPB_BEGIN_EXTERN_C const struct upb_refcounted_vtbl upb_filedef_vtbl
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_new(upb_arena *arena)
static PyObject * AddMessage(RepeatedCompositeContainer *self, PyObject *value)
@ google_protobuf_FieldDescriptorProto_TYPE_SINT64
int upb_status_errcode(const upb_status *status)
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
UPB_INLINE upb_decoderet upb_decoderet_make(const char *p, uint64_t val)
int32_t upb_pbdecoder_skipunknown(upb_pbdecoder *d, int32_t fieldnum, uint8_t wire_type)
const upb_msglayout google_protobuf_MethodOptions_msginit
const void * return_closure_type_
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
static size_t begin(const upb_table *t)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_ServiceOptions_f_uninterpreted_option(const upb_msgdef *m)
struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto
upb_inttable * upb_inttable_pack(const upb_inttable *t, void *p, size_t *ofs, size_t size)
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_arena *arena)
const UPB_BEGIN_EXTERN_C void * UPB_UNTRACKED_REF
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t *len)
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg)
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_parsenew(upb_strview buf, upb_arena *arena)
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len)
const char * upb_msgdef_fullname(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_ServiceDescriptorProto_f_name(const upb_msgdef *m)
size_t upb_descreader_filecount(const upb_descreader *r)
void upb_fielddef_setintfmt(upb_fielddef *f, upb_intfmt_t fmt)
UPB_INLINE upb_strview const * google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg, size_t *len)
void upb_pbdecodermethodopts_setlazy(upb_pbdecodermethodopts *opts, bool lazy)
bool upb_fielddef_typeisset(const upb_fielddef *f)
UPB_INLINE upb_def * upb_filedef_mutabledef(upb_filedef *f, int i)
UPB_INLINE bool upbdefs_google_protobuf_FileDescriptorSet_is(const upb_msgdef *m)
upb_msgval upb_mapiter_key(const upb_mapiter *i)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_nested_type(const upb_msgdef *m)
void upb_mapiter_setdone(upb_mapiter *i)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodDescriptorProto_f_options(const upb_msgdef *m)
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_JSType value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodOptions_f_uninterpreted_option(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg)
bool upb_handlers_setuint64(upb_handlers *h, const upb_fielddef *f, upb_uint64_handlerfunc *func, upb_handlerattr *attr)
bool upb_symtab_done(const upb_symtab_iter *iter)
GLsizei GLsizei GLuint * obj
@ google_protobuf_FieldDescriptorProto_TYPE_GROUP
UPB_BEGIN_EXTERN_C bool upb_decode(upb_strview buf, upb_msg *msg, const upb_msglayout *l)
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE bool upb_inttable_push(upb_inttable *t, upb_value val)
void upb_pbdecodermethodopts_init(upb_pbdecodermethodopts *opts, const upb_handlers *h)
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange ** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE struct google_protobuf_ServiceOptions * google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena)
void upb_mapiter_begin(upb_mapiter *i, const upb_map *t)
void upb_status_clear(upb_status *status)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_arena *arena)
const upb_msglayout google_protobuf_OneofOptions_msginit
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldOptions_f_packed(const upb_msgdef *m)
UPB_INLINE struct google_protobuf_ExtensionRangeOptions * google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena)
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t *len)
@ UPB_DESCRIPTOR_TYPE_DOUBLE
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE struct google_protobuf_FieldDescriptorProto * google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_arena *arena)
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg)
struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len)
const char * upb_filedef_phpnamespace(const upb_filedef *f)
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
UPB_BEGIN_EXTERN_C const struct upb_refcounted_vtbl upb_oneofdef_vtbl
UPB_INLINE char * google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len)
UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg)
@ google_protobuf_FieldOptions_JS_STRING
UPB_INLINE size_t upb_sink_putstring(upb_sink *s, upb_selector_t sel, const char *buf, size_t n, const upb_bufhandle *handle)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MessageOptions_f_uninterpreted_option(const upb_msgdef *m)
UPB_INLINE int32_t const * google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value)
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value)
void upb_fielddef_setlabel(upb_fielddef *f, upb_label_t label)
UPB_INLINE google_protobuf_FileDescriptorProto ** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet *msg, size_t *len)
UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg)
UPB_INLINE bool upb_inttable_lookup32(const upb_inttable *t, uint32_t key, upb_value *v)
UPB_INLINE bool upbdefs_google_protobuf_DescriptorProto_ExtensionRange_is(const upb_msgdef *m)
UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value)
const struct upb_refcounted_vtbl * vtbl
UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg)
bool upb_filedef_setpackage(upb_filedef *f, const char *package, upb_status *s)
uint32_t upb_handlers_selectorbaseoffset(const upb_fielddef *f)
@ google_protobuf_FieldDescriptorProto_TYPE_SINT32
static void putbuf(upb_pb_encoder *e, const char *buf, size_t len)
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto
void upb_env_uninit(upb_env *e)
UPB_INLINE google_protobuf_EnumValueDescriptorProto ** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto *msg, size_t *len)
@ UPB_DESCRIPTOR_TYPE_FIXED64
bool upb_float_handlerfunc(void *c, const void *hd, float val)
const void * handler_data_
UPB_INLINE uint64_t upb_pbdecoder_packdispatch(uint64_t ofs, uint8_t wt1, uint8_t wt2)
void upb_arena_uninit(upb_arena *a)
static const struct upb_refcounted_vtbl vtbl
char * upb_strdup2(const char *s, size_t len, upb_alloc *a)
int upb_msgdef_numoneofs(const upb_msgdef *m)
int32_t upb_enum_iter_number(upb_enum_iter *iter)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg)
UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg)
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_new(upb_arena *arena)
bool upb_oneof_done(upb_oneof_iter *iter)
const upb_msgdef * upbdefs_google_protobuf_FieldDescriptorProto_get(const void *owner)
void upb_handlers_clearerr(upb_handlers *h)
UPB_INLINE char * google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len)
void upb_inttable_compact2(upb_inttable *t, upb_alloc *a)
bool upb_fielddef_isprimitive(const upb_fielddef *f)
PyObject * FindFieldByName(PyDescriptorPool *self, PyObject *arg)
UPB_INLINE bool upbdefs_google_protobuf_SourceCodeInfo_is(const upb_msgdef *m)
const UPB_INLINE google_protobuf_SourceCodeInfo_Location *const * google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg, size_t *len)
bool upb_inttable_replace(upb_inttable *t, uintptr_t key, upb_value val)
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value)
struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto
UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg)
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_parsenew(upb_strview buf, upb_arena *arena)
const upb_msgdef * upbdefs_google_protobuf_OneofDescriptorProto_get(const void *owner)
FloatingPoint< float > Float
const upb_handlers * upb_textprinter_newhandlers(const upb_msgdef *m, const void *owner)
UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg)
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value)
@ google_protobuf_FieldDescriptorProto_LABEL_REPEATED
UPB_INLINE size_t upb_bytessink_putbuf(upb_bytessink *s, void *subc, const char *buf, size_t size, const upb_bufhandle *handle)
UPB_INLINE upb_strview * google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena)
bool upb_fielddef_setenumsubdef(upb_fielddef *f, const upb_enumdef *subdef, upb_status *s)
bool upb_inttable_iter_isequal(const upb_inttable_iter *i1, const upb_inttable_iter *i2)
bool upb_env_addcleanup(upb_env *e, upb_cleanup_func *func, void *ud)
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, google_protobuf_FileOptions_OptimizeMode value)
void upb_mapiter_free(upb_mapiter *i, upb_alloc *a)
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE void upb_bufhandle_init(upb_bufhandle *h)
UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg)
@ UPB_DESCRIPTOR_TYPE_SFIXED64
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg)
const upb_def * upb_fielddef_subdef(const upb_fielddef *f)
@ UPB_DESCRIPTOR_TYPE_UINT32
struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_arena *arena)
bool upb_handlers_setint64(upb_handlers *h, const upb_fielddef *f, upb_int64_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE char * google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len)
const upb_msglayout google_protobuf_EnumValueOptions_msginit
UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg)
GLint GLint GLsizei GLint GLenum format
double upb_fielddef_defaultdouble(const upb_fielddef *f)
const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit
upb_arena * upb_msg_arena(const upb_msg *msg)
const upb_msgdef * upbdefs_google_protobuf_UninterpretedOption_NamePart_get(const void *owner)
bool operator==(const in6_addr a, const in6_addr b)
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_parsenew(upb_strview buf, upb_arena *arena)
#define UPB_STATUS_MAX_MESSAGE
UPB_INLINE struct google_protobuf_DescriptorProto * google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
static PyObject * New(PyTypeObject *type, PyObject *args, PyObject *kwargs)
struct google_protobuf_EnumOptions google_protobuf_EnumOptions
bool upb_handlers_setbool(upb_handlers *h, const upb_fielddef *f, upb_bool_handlerfunc *func, upb_handlerattr *attr)
size_t upb_env_bytesallocated(const upb_env *e)
UPB_INLINE upb_selector_t upb_handlers_getendselector(upb_selector_t start)
size_t upb_bufhandle_objofs(const upb_bufhandle *h)
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value)
UPB_INLINE google_protobuf_OneofDescriptorProto ** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg)
const char * upb_def_name(const upb_def *d)
UPB_INLINE bool _upb_sethas(const void *msg, size_t idx)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_arena *arena)
const upb_msgdef * upb_fielddef_msgsubdef(const upb_fielddef *f)
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
upb_fieldtype_t upb_map_keytype(const upb_map *map)
UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena)
UPB_INLINE char * google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len)
const upb_msglayout google_protobuf_SourceCodeInfo_msginit
const UPB_INLINE void * upb_handlerattr_handlerdata(const upb_handlerattr *attr)
bool upb_fielddef_setnumber(upb_fielddef *f, uint32_t number, upb_status *s)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_cc_enable_arenas(const upb_msgdef *m)
UPB_BEGIN_EXTERN_C upb_textprinter * upb_textprinter_create(upb_env *env, const upb_handlers *h, upb_bytessink *output)
const upb_oneofdef * upb_fielddef_containingoneof(const upb_fielddef *f)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_extension(const upb_msgdef *m)
struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg)
UPB_BEGIN_EXTERN_C typedef bool upb_unknown_handlerfunc(void *c, const void *hd, const char *buf, size_t n)
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_ServiceOptions_f_deprecated(const upb_msgdef *m)
bool upb_handlers_setunknown(upb_handlers *h, upb_unknown_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, google_protobuf_MethodOptions_IdempotencyLevel value)
@ UPB_DESCRIPTOR_TYPE_INT32
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_new(upb_arena *arena)
@ UPB_WELLKNOWN_INT32VALUE
bool upb_msgdef_mapentry(const upb_msgdef *m)
const upb_msgdef * upbdefs_google_protobuf_ServiceDescriptorProto_get(const void *owner)
bool IsMap(const google::protobuf::Field &field, const google::protobuf::Type &type)
bool upb_handlerattr_alwaysok(const upb_handlerattr *attr)
upb_error_func * error_func_
UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg)
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value)
void upb_fielddef_setdefaultcstr(upb_fielddef *f, const char *str, upb_status *s)
UPB_INLINE struct google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_arena *arena)
UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg)
upb_filedef * upb_filedef_new(const void *owner)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_service(const upb_msgdef *m)
UPB_INLINE int32_t * google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_arena *arena)
bool upb_fielddef_ismap(const upb_fielddef *f)
upb_sink * upb_textprinter_input(upb_textprinter *p)
@ UPB_WELLKNOWN_INT64VALUE
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena)
const void * upb_handlerattr_closuretype(const upb_handlerattr *attr)
GTEST_API_ const char * fmt
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_java_outer_classname(const upb_msgdef *m)
bool upb_def_freeze(upb_def *const *defs, size_t n, upb_status *s)
int upb_oneofdef_numfields(const upb_oneofdef *o)
bool upb_fielddef_setjsonname(upb_fielddef *f, const char *name, upb_status *s)
UPB_INLINE bool upbdefs_google_protobuf_MethodDescriptorProto_is(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_label(const upb_msgdef *m)
UPB_INLINE upb_msgval upb_msgval_makestr(const char *data, size_t size)
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_strview value)
bool upb_filedef_setsyntax(upb_filedef *f, upb_syntax_t syntax, upb_status *s)
const struct upb_msglayout *const * submsgs
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
UPB_INLINE bool upb_sink_startmsg(upb_sink *s)
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value)
const upb_status * upb_handlers_status(upb_handlers *h)
UPB_INLINE uint64_t upb_zzenc_64(int64_t n)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_OneofDescriptorProto_f_name(const upb_msgdef *m)
bool upb_handlers_setstring(upb_handlers *h, const upb_fielddef *f, upb_string_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_arena *arena)
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_new(upb_arena *arena)
UPB_INLINE google_protobuf_FieldOptions_JSType google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg)
bool upb_handlers_setstartmsg(upb_handlers *h, upb_startmsg_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE bool upb_strtable_insert(upb_strtable *t, const char *key, upb_value val)
void upb_oneof_iter_setdone(upb_oneof_iter *iter)
size_t upb_pbdecoder_maxnesting(const upb_pbdecoder *d)
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg)
const upb_handlers * upb_pbdecodermethod_desthandlers(const upb_pbdecodermethod *m)
UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg)
UPB_INLINE struct google_protobuf_MethodDescriptorProto * google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena)
bool upb_fielddef_clearjsonname(upb_fielddef *f)
const UPB_BEGIN_EXTERN_C char * upb_status_errmsg(const upb_status *status)
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg)
bool upb_symtab_add(upb_symtab *s, upb_def *const *defs, size_t n, void *ref_donor, upb_status *status)
const UPB_INLINE google_protobuf_UninterpretedOption_NamePart *const * google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len)
size_t upb_filedef_defcount(const upb_filedef *f)
upb_bytessink * upb_json_parser_input(upb_json_parser *p)
const char * upb_enumdef_fullname(const upb_enumdef *e)
int32_t upb_enumdef_default(const upb_enumdef *e)
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg)
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg)
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions *value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_go_package(const upb_msgdef *m)
const upb_msglayout google_protobuf_FieldDescriptorProto_msginit
UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg)
const char * upb_oneofdef_name(const upb_oneofdef *o)
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE upb_strview upb_strview_make(const char *data, size_t size)
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_arena *arena)
#define UPB_ENDSTR_SELECTOR
upb_bytessink * upb_pbdecoder_input(upb_pbdecoder *d)
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg)
const upb_msglayout google_protobuf_OneofDescriptorProto_msginit
UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg)
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto *msg, size_t *len)
UPB_BEGIN_EXTERN_C const struct upb_refcounted_vtbl upb_enumdef_vtbl
bool upb_endmsg_handlerfunc(void *c, const void *, upb_status *status)
bool upb_handlers_setstartsubmsg(upb_handlers *h, const upb_fielddef *f, upb_startfield_handlerfunc *func, upb_handlerattr *attr)
@ google_protobuf_FieldOptions_JS_NORMAL
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions *msg, upb_arena *arena)
uint32_t upb_handlers_selectorcount(const upb_fielddef *f)
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
uint32_t MurmurHash2(const void *key, size_t len, uint32_t seed)
const UPB_INLINE upb_oneofdef * upb_msgdef_ntooz(const upb_msgdef *m, const char *name)
bool upb_msgdef_setfullname(upb_msgdef *m, const char *fullname, upb_status *s)
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg)
bool upb_handlers_setdouble(upb_handlers *h, const upb_fielddef *f, upb_double_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg)
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto *msg, size_t *len)
@ google_protobuf_FieldDescriptorProto_TYPE_UINT64
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len)
struct upb_msglayout upb_msglayout
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodDescriptorProto_f_input_type(const upb_msgdef *m)
bool upb_filedef_freeze(upb_filedef *f, upb_status *s)
const upb_enumdef * upbdefs_google_protobuf_FileOptions_OptimizeMode_get(const void *owner)
upb_msgval upb_msg_get(const upb_msg *msg, int field_index, const upb_msglayout *l)
void upb_strtable_iter_setdone(upb_strtable_iter *i)
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg)
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
const upb_fielddef * upb_msgdef_itof(const upb_msgdef *m, uint32_t i)
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena)
UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg)
UPB_INLINE char * google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len)
@ google_protobuf_FieldDescriptorProto_TYPE_SFIXED32
SETUP_TEARDOWN_TESTCONTEXT typedef uint8_t byte
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_parsenew(upb_strview buf, upb_arena *arena)
bool upb_enumdef_setfullname(upb_enumdef *e, const char *fullname, upb_status *s)
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value)
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange ** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
void upb_msg_field_next(upb_msg_field_iter *iter)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_arena *arena)
void upb_fielddef_setdefaultuint64(upb_fielddef *f, uint64_t val)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_oneof_index(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_ServiceDescriptorProto_f_options(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MessageOptions_f_map_entry(const upb_msgdef *m)
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_strview value)
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_new(upb_arena *arena)
UPB_BEGIN_EXTERN_C char * upb_encode(const void *msg, const upb_msglayout *l, upb_arena *arena, size_t *size)
bool upb_ok(const upb_status *status)
#define PUTVAL(type, ctype)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_extension_range(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg)
UPB_INLINE bool upb_bytessink_end(upb_bytessink *s)
UPB_INLINE char * google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len)
UPB_INLINE bool upbdefs_google_protobuf_FileOptions_is(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_options(const upb_msgdef *m)
const upb_fielddef * upb_oneofdef_ntof(const upb_oneofdef *o, const char *name, size_t length)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t *len)
uint32_t individual_count
bool upb_pbdecoder_end(void *closure, const void *handler_data)
UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg)
#define UPB_DISALLOW_COPY_AND_ASSIGN(class_name)
struct google_protobuf_FieldOptions google_protobuf_FieldOptions
const FieldDescriptor * field
void * upb_alloc_func(upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg)
upb_msgval upb_mapiter_value(const upb_mapiter *i)
upb_handlers * upb_handlers_new(const upb_msgdef *m, const void *owner)
GLenum GLuint GLenum GLsizei const GLchar * buf
UPB_END_EXTERN_C typedef upb_inttable_iter upb_msg_field_iter
#define UPB_STARTMSG_SELECTOR
const SETUP_TEARDOWN_TESTCONTEXT char * key
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena)
UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg)
UPB_INLINE bool upbdefs_google_protobuf_EnumValueOptions_is(const upb_msgdef *m)
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg)
const char * upb_msgdef_name(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg)
UPB_INLINE int32_t const * google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption
UPB_INLINE void _upb_value_setval(upb_value *v, uint64_t val, upb_ctype_t ctype)
UPB_INLINE bool upbdefs_google_protobuf_FileOptions_OptimizeMode_is(const upb_enumdef *e)
UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg)
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_default_value(const upb_msgdef *m)
bool upb_inttable_init2(upb_inttable *table, upb_ctype_t ctype, upb_alloc *a)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg)
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_parsenew(upb_strview buf, upb_arena *arena)
int32_t upb_pbdecoder_decode_f64(upb_pbdecoder *d, uint64_t *u64)
const UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg)
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
google_protobuf_FieldDescriptorProto_Label
bool upb_msg_setscalarhandler(upb_handlers *h, const upb_fielddef *f, size_t offset, int32_t hasbit)
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg)
const upb_enumdef * upb_fielddef_enumsubdef(const upb_fielddef *f)
UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg)
void upb_pbdecoder_seterr(upb_pbdecoder *d, const char *msg)
const upb_msgdef * upbdefs_google_protobuf_FileDescriptorSet_get(const void *owner)
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview val, upb_arena *arena)
static PyObject * GetData(PyUnknownFieldRef *self, void *closure)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg)
@ UPB_WELLKNOWN_LISTVALUE
const UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *const * google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len)
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value)
UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_strview value)
const upb_pbdecodermethod * upb_pbdecoder_method(const upb_pbdecoder *d)
bool _upb_def_validate(upb_def *const *defs, size_t n, upb_status *s)
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_ExtensionRange_f_end(const upb_msgdef *m)
void upb_env_initonly(upb_env *e)
bool upb_msgdef_isnumberwrapper(const upb_msgdef *m)
UPB_BEGIN_EXTERN_C upb_bufsink * upb_bufsink_new(upb_env *env)
const char * upb_def_fullname(const upb_def *d)
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto *msg, size_t *len)
const upb_msglayout google_protobuf_ServiceOptions_msginit
void upb_enum_begin(upb_enum_iter *iter, const upb_enumdef *e)
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_strview value)
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg)
@ google_protobuf_FieldOptions_CORD
UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions *value)
const upb_json_parsermethod const upb_symtab * symtab
const upb_json_parsermethod const upb_symtab upb_sink bool ignore_json_unknown
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg)
bool upb_bufsrc_putbuf(const char *buf, size_t len, upb_bytessink *sink)
Status
Status of any operation that the TOF sdk performs.
bool upb_fielddef_setmsgsubdef(upb_fielddef *f, const upb_msgdef *subdef, upb_status *s)
const upb_msgdef * upbdefs_google_protobuf_FileDescriptorProto_get(const void *owner)
const struct _upb_tabent * next
UPB_INLINE bool upb_inttable_insertptr(upb_inttable *t, const void *key, upb_value val)
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena)
UPB_INLINE bool upb_arrhas(upb_tabval key)
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
const upb_msglayout google_protobuf_UninterpretedOption_msginit
UPB_INLINE void upb_pbdecoder_unpackdispatch(uint64_t dispatch, uint64_t *ofs, uint8_t *wt1, uint8_t *wt2)
const char * upb_enum_iter_name(upb_enum_iter *iter)
UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg)
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg)
UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg)
@ UPB_DESCRIPTOR_TYPE_BOOL
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value)
const upb_msgdef * upbdefs_google_protobuf_SourceCodeInfo_Location_get(const void *owner)
@ google_protobuf_FieldDescriptorProto_TYPE_FLOAT
const UPB_INLINE google_protobuf_ServiceDescriptorProto *const * google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len)
bool upb_handlers_setendseq(upb_handlers *h, const upb_fielddef *f, upb_endfield_handlerfunc *func, upb_handlerattr *attr)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len)
bool upb_handlers_setendstr(upb_handlers *h, const upb_fielddef *f, upb_endfield_handlerfunc *func, upb_handlerattr *attr)
void upb_oneof_next(upb_oneof_iter *iter)
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value)
UPB_INLINE struct google_protobuf_SourceCodeInfo * google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumValueDescriptorProto_f_number(const upb_msgdef *m)
void upb_fielddef_settagdelim(upb_fielddef *f, bool tag_delim)
#define UPB_STARTSTR_SELECTOR
upb_sink * upb_descreader_input(upb_descreader *r)
#define UPB_UNKNOWN_SELECTOR
UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg)
upb_json_parsermethod * upb_json_parsermethod_new(const upb_msgdef *md, const void *owner)
UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg)
bool upb_msgdef_addfield(upb_msgdef *m, upb_fielddef *f, const void *ref_donor, upb_status *s)
UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg)
bool upb_handlers_setsubhandlers(upb_handlers *h, const upb_fielddef *f, const upb_handlers *sub)
bool upb_msg_has(const upb_msg *msg, int field_index, const upb_msglayout *l)
UPB_INLINE char * google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_java_package(const upb_msgdef *m)
UPB_INLINE void upb_inttable_compact(upb_inttable *t)
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena)
const upb_msgdef * upbdefs_google_protobuf_UninterpretedOption_get(const void *owner)
const upb_msglayout google_protobuf_FileOptions_msginit
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg)
size_t upb_mapiter_sizeof()
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg)
static const upb_fielddef fields[107]
bool upb_handlers_setstartseq(upb_handlers *h, const upb_fielddef *f, upb_startfield_handlerfunc *func, upb_handlerattr *attr)
static void * startseq(void *closure, const void *handler_data)
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_parsenew(upb_strview buf, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumValueDescriptorProto_f_name(const upb_msgdef *m)
const char * upb_pbdecoder_getopname(unsigned int op)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_SourceCodeInfo_Location_f_span(const upb_msgdef *m)
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_parsenew(upb_strview buf, upb_arena *arena)
upb_msgdef * upb_fielddef_containingtype_mutable(upb_fielddef *f)
static const upb_tabent * upb_getentry(const upb_table *t, uint32_t hash)
struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_new(upb_arena *arena)
@ UPB_DESCRIPTOR_TYPE_SFIXED32
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena)
@ google_protobuf_FieldDescriptorProto_TYPE_MESSAGE
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldDescriptorProto_Type value)
const upb_msgdef * upbdefs_google_protobuf_EnumOptions_get(const void *owner)
UPB_INLINE upb_decoderet upb_vdecode_fast(const char *p)
UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg)
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE void upb_value_setdouble(upb_value *val, double cval)
UPB_INLINE void upb_bytessink_reset(upb_bytessink *s, const upb_byteshandler *h, void *closure)
UPB_INLINE bool upb_bytessink_start(upb_bytessink *s, size_t size_hint, void **subc)
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg)
UPB_INLINE char * google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len)
bool upb_env_reporterror(upb_env *e, const upb_status *s)
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_parsenew(upb_strview buf, upb_arena *arena)
@ google_protobuf_FieldDescriptorProto_TYPE_BOOL
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_field(const upb_msgdef *m)
void upb_fielddef_setpacked(upb_fielddef *f, bool packed)
UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value)
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_parsenew(upb_strview buf, upb_arena *arena)
upb_label_t upb_fielddef_label(const upb_fielddef *f)
UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg)
bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val)
UPB_INLINE google_protobuf_UninterpretedOption_NamePart ** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len)
const UPB_BEGIN_EXTERN_C upb_handlers * upb_pb_encoder_newhandlers(const upb_msgdef *m, const void *owner)
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg)
void upb_oneof_begin(upb_oneof_iter *iter, const upb_oneofdef *o)
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value)
const upb_oneofdef * upb_msgdef_ntoo(const upb_msgdef *m, const char *name, size_t len)
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo *value)
UPB_INLINE upb_fielddef * upb_msgdef_ntof_mutable(upb_msgdef *m, const char *name, size_t len)
#define UPB_VARINT_DECODER_CHECK2(name, decode_max8_function)
bool upb_filedef_adddep(upb_filedef *f, const upb_filedef *dep)
bool upb_fielddef_checklabel(int32_t label)
bool upb_msgdef_freeze(upb_msgdef *m, upb_status *status)
uintptr_t upb_inttable_iter_key(const upb_inttable_iter *i)
UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num)
upb_oneofdef * upb_msg_iter_oneof(const upb_msg_oneof_iter *iter)
UPB_INLINE char * google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len)
#define UPB_DECODER_MAX_RESIDUAL_BYTES
UPB_INLINE bool upbdefs_google_protobuf_FieldDescriptorProto_is(const upb_msgdef *m)
UPB_END_EXTERN_C typedef upb_inttable_iter upb_oneof_iter
UPB_INLINE bool upbdefs_google_protobuf_MessageOptions_is(const upb_msgdef *m)
const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit
UPB_INLINE bool upbdefs_google_protobuf_UninterpretedOption_is(const upb_msgdef *m)
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len)
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg)
const upb_handlers * upb_descreader_newhandlers(const void *owner)
const upb_msgdef * upb_handlers_msgdef(const upb_handlers *h)
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg)
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_new(upb_arena *arena)
UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg)
UPB_INLINE google_protobuf_EnumValueDescriptorProto ** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_new(upb_arena *arena)
EnumDescriptorProto * AddEnum(FileDescriptorProto *file, const std::string &name)
const UPB_INLINE void * upb_handlers_gethandlerdata(const upb_handlers *h, upb_selector_t s)
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value)
const upb_msglayout google_protobuf_DescriptorProto_msginit
#define UPB_BEGIN_EXTERN_C
bool upb_inttable_lookup(const upb_inttable *t, uintptr_t key, upb_value *v)
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_parsenew(upb_strview buf, upb_arena *arena)
@ UPB_DESCRIPTOR_TYPE_GROUP
bool upb_fielddef_setcontainingtypename(upb_fielddef *f, const char *name, upb_status *s)
const upb_msgdef * upbdefs_google_protobuf_DescriptorProto_ExtensionRange_get(const void *owner)
bool upb_endfield_handlerfunc(void *c, const void *hd)
const upb_def * upb_symtab_lookup(const upb_symtab *s, const char *sym)
const upb_filedef * upb_filedef_dep(const upb_filedef *f, size_t i)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_SourceCodeInfo_f_location(const upb_msgdef *m)
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_new(upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_syntax(const upb_msgdef *m)
UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value)
const char * upb_bufsink_getdata(const upb_bufsink *sink, size_t *len)
@ UPB_WELLKNOWN_UINT64VALUE
UPB_INLINE upb_oneofdef * upb_msgdef_ntoo_mutable(upb_msgdef *m, const char *name, size_t len)
struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange
bool upb_fielddef_checktype(int32_t type)
void upb_pbdecoder_jit(mgroup *group)
size_t upb_strtable_iter_keylength(const upb_strtable_iter *i)
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg)
static bool endmsg(void *c, const void *hd, upb_status *status)
@ google_protobuf_FieldDescriptorProto_TYPE_UINT32
UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg)
#define SET_TYPE(dest, val)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_source_code_info(const upb_msgdef *m)
struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange
const upb_pbdecodermethod * upb_pbdecodermethod_new(const upb_pbdecodermethodopts *opts, const void *owner)
UPB_INLINE char * google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len)
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE bool upb_inttable_insert(upb_inttable *t, uintptr_t key, upb_value val)
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_new(upb_arena *arena)
upb_wellknowntype_t upb_msgdef_wellknowntype(const upb_msgdef *m)
bool upb_refcounted_init(upb_refcounted *r, const struct upb_refcounted_vtbl *vtbl, const void *owner)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_java_generate_equals_and_hash(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_dependency(const upb_msgdef *m)
upb_fielddef * upb_oneof_iter_field(const upb_oneof_iter *iter)
bool upb_fielddef_defaultbool(const upb_fielddef *f)
void upb_fielddef_setlazy(upb_fielddef *f, bool lazy)
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange ** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena)
const UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg)
const char * upb_strtable_iter_key(const upb_strtable_iter *i)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_javanano_use_deprecated_package(const upb_msgdef *m)
UPB_INLINE upb_value _upb_value_val(uint64_t val, upb_ctype_t ctype)
const upb_enumdef * upbdefs_google_protobuf_FieldOptions_JSType_get(const void *owner)
void upb_fielddef_setdefaultint32(upb_fielddef *f, int32_t val)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_f_string_value(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_py_generic_services(const upb_msgdef *m)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t *len)
UPB_INLINE bool upbdefs_google_protobuf_MethodOptions_is(const upb_msgdef *m)
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation ** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t *len)
void upb_msg_field_begin(upb_msg_field_iter *iter, const upb_msgdef *m)
const UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *const * google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE upb_value upb_value_double(double cval)
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena)
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_type_name(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg)
const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit
bool upb_def_setfullname(upb_def *def, const char *fullname, upb_status *s)
UPB_INLINE bool upbdefs_google_protobuf_DescriptorProto_ReservedRange_is(const upb_msgdef *m)
static bool startmsg(void *c, const void *hd)
bool operator!=(const detail::socket_base &a, const detail::socket_base &b) ZMQ_NOTHROW
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_json_name(const upb_msgdef *m)
const upb_msgdef * upb_symtab_lookupmsg(const upb_symtab *s, const char *sym)
UPB_INLINE upb_strview const * google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
@ UPB_DESCRIPTOR_TYPE_MESSAGE
bool upb_double_handlerfunc(void *c, const void *hd, double val)
void upb_msg_oneof_next(upb_msg_oneof_iter *iter)
void upb_env_seterrorfunc(upb_env *e, upb_error_func *func, void *ud)
upb_mapiter * upb_mapiter_new(const upb_map *t, upb_alloc *a)
@ google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN
const upb_handlers * upb_json_parsermethod_desthandlers(const upb_json_parsermethod *m)
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len)
UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg)
const upb_symtab * upb_msgfactory_symtab(const upb_msgfactory *f)
UPB_INLINE google_protobuf_UninterpretedOption_NamePart ** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_arena *arena)
UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg)
UPB_INLINE struct google_protobuf_EnumDescriptorProto * google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
const UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg)
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg)
const upb_handlers * upb_handlers_newfrozen(const upb_msgdef *m, const void *owner, upb_handlers_callback *callback, const void *closure)
UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg)
FieldDescriptorProto * AddField(DescriptorProto *parent, const std::string &name, int number, FieldDescriptorProto::Label label, FieldDescriptorProto::Type type)
UPB_INLINE void * upb_gmalloc(size_t size)
bool upb_fielddef_lazy(const upb_fielddef *f)
UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value)
const upb_json_parsermethod * m
UPB_PRIVATE_FOR_CPP upb_strtable_iter iter
void upb_upberr_setoom(upb_status *s)
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value)
struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet
int64_t upb_fielddef_defaultint64(const upb_fielddef *f)
upb_decoderet upb_vdecode_max8_branch32(upb_decoderet r)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_arena *arena)
UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions *value)
UPB_INLINE struct google_protobuf_FieldOptions * google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena)
const upb_msglayout google_protobuf_FileDescriptorProto_msginit
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_cc_generic_services(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg)
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_new(upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_f_aggregate_value(const upb_msgdef *m)
@ google_protobuf_FieldDescriptorProto_TYPE_INT32
const upb_byteshandler * upb_json_parsermethod_inputhandler(const upb_json_parsermethod *m)
void upb_pbdecoder_freejit(mgroup *group)
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value)
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg)
upb_fielddef * upb_msg_iter_field(const upb_msg_field_iter *iter)
void upb_fielddef_setdefaultbool(upb_fielddef *f, bool val)
UPB_INLINE bool upb_filedef_addext(upb_filedef *file, upb_fielddef *f, const void *ref_donor, upb_status *s)
void upb_strtable_next(upb_strtable_iter *i)
void upb_handlerattr_uninit(upb_handlerattr *attr)
upb_sink * upb_json_printer_input(upb_json_printer *p)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_php_namespace(const upb_msgdef *m)
UPB_BEGIN_EXTERN_C const struct upb_refcounted_vtbl upb_msgdef_vtbl
UPB_INLINE google_protobuf_SourceCodeInfo_Location ** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_arena *arena)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_ReservedRange_f_start(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg)
void upb_arena_setnextblocksize(upb_arena *a, size_t size)
void upb_fielddef_setdefaultint64(upb_fielddef *f, int64_t val)
google_protobuf_FieldDescriptorProto_Type
bool upb_strtable_lookup2(const upb_strtable *t, const char *key, size_t len, upb_value *v)
UPB_INLINE upb_strview const * google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_uninterpreted_option(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_strview val, upb_arena *arena)
void upb_status_seterrf(upb_status *status, const char *fmt,...)
UPB_INLINE void upb_free(upb_alloc *alloc, void *ptr)
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena)
const char * upb_fielddef_containingtypename(upb_fielddef *f)
bool upb_handlerattr_sethandlerdata(upb_handlerattr *attr, const void *hd)
const char * upb_fielddef_defaultstr(const upb_fielddef *f, size_t *len)
UPB_INLINE void upb_value_setfloat(upb_value *val, float cval)
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_parsenew(upb_strview buf, upb_arena *arena)
UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value)
#define UPB_PB_DECODER_SIZE
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg)
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_parsenew(upb_strview buf, upb_arena *arena)
const upb_msgdef * upbdefs_google_protobuf_DescriptorProto_ReservedRange_get(const void *owner)
static void visit(const upb_refcounted *r, upb_refcounted_visit *v, void *closure)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_optimize_for(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg)
upb_sink * upb_pb_encoder_input(upb_pb_encoder *p)
@ UPB_WELLKNOWN_TIMESTAMP
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena)
UPB_INLINE upb_strview * google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg)
const upb_enumdef * upb_symtab_lookupenum(const upb_symtab *s, const char *sym)
UPB_INLINE char * google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len)
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena)
@ google_protobuf_FieldDescriptorProto_TYPE_FIXED32
UPB_INLINE char * google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len)
UPB_INLINE bool upbdefs_google_protobuf_OneofDescriptorProto_is(const upb_msgdef *m)
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumDescriptorProto_f_value(const upb_msgdef *m)
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena)
const UPB_INLINE google_protobuf_EnumDescriptorProto *const * google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg, size_t *len)
#define UPB_FIELD_AT(msg, fieldtype, offset)
UPB_INLINE upb_alloc * upb_arena_alloc(upb_arena *a)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
void upb_handlers_callback(const void *closure, upb_handlers *h)
UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg)
bool upb_enum_done(upb_enum_iter *iter)
UPB_INLINE int32_t * google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len)
UPB_INLINE bool upbdefs_google_protobuf_DescriptorProto_is(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg)
UPB_INLINE google_protobuf_ServiceDescriptorProto ** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
const UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *const * google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg, size_t *len)
UPB_INLINE uint32_t upb_zzenc_32(int32_t n)
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg)
const UPB_INLINE upb_fielddef * upb_oneofdef_ntofz(const upb_oneofdef *o, const char *name)
UPB_BEGIN_EXTERN_C typedef void upb_msg
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_UninterpretedOption_f_double_value(const upb_msgdef *m)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_options(const upb_msgdef *m)
void(* visit)(const upb_refcounted *r, upb_refcounted_visit *visit, void *c)
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions *value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_SourceCodeInfo_Location_f_trailing_comments(const upb_msgdef *m)
#define UPB_ENDMSG_SELECTOR
UPB_BEGIN_EXTERN_C void upb_env_init(upb_env *e)
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_parsenew(upb_strview buf, upb_arena *arena)
struct google_protobuf_FileOptions google_protobuf_FileOptions
float upb_fielddef_defaultfloat(const upb_fielddef *f)
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg)
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg)
upb_syntax_t upb_filedef_syntax(const upb_filedef *f)
@ UPB_WELLKNOWN_DOUBLEVALUE
#define UPB_REFCOUNTED_CPPMETHODS
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t *len)
UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_arena *arena)
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value)
void upb_byteshandler_init(upb_byteshandler *h)
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena)
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg)
UPB_INLINE google_protobuf_SourceCodeInfo_Location ** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo *msg, size_t *len)
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len)
bool upb_array_set(upb_array *arr, size_t i, upb_msgval val)
uint32_t upb_fielddef_defaultuint32(const upb_fielddef *f)
upb_strtable_iter upb_msg_oneof_iter
UPB_INLINE size_t upb_varint_size(uint64_t val)
bool upb_int64_handlerfunc(void *c, const void *hd, int64_t val)
const void * closure_type_
UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto *msg, upb_arena *arena)
bool upb_fielddef_setsubdef(upb_fielddef *f, const upb_def *subdef, upb_status *s)
google_protobuf_FieldOptions_CType
UPB_BEGIN_EXTERN_C UPB_INLINE upb_func * upb_handlers_gethandler(const upb_handlers *h, upb_selector_t s)
uint64_t upb_fielddef_defaultuint64(const upb_fielddef *f)
internal::ReturnAction< R > Return(R value)
void * upb_env_realloc(upb_env *e, void *ptr, size_t oldsize, size_t size)
void upb_fielddef_setdefaultuint32(upb_fielddef *f, uint32_t val)
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange ** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_new(upb_arena *arena)
@ google_protobuf_FieldOptions_JS_NUMBER
UPB_BEGIN_EXTERN_C upb_descreader * upb_descreader_create(upb_env *e, const upb_handlers *h)
@ google_protobuf_FileOptions_SPEED
bool upb_fielddef_enumhasdefaultint32(const upb_fielddef *f)
bool upb_inttable_insert2(upb_inttable *t, uintptr_t key, upb_value val, upb_alloc *a)
UPB_INLINE void * upb_realloc(upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
@ google_protobuf_FileOptions_LITE_RUNTIME
UPB_INLINE void * _upb_array_mutable_accessor(void *msg, size_t ofs, size_t *size)
bool upb_handlers_setfloat(upb_handlers *h, const upb_fielddef *f, upb_float_handlerfunc *func, upb_handlerattr *attr)
struct google_protobuf_MessageOptions google_protobuf_MessageOptions
bool upb_strtable_iter_isequal(const upb_strtable_iter *i1, const upb_strtable_iter *i2)
bool upb_fielddef_setname(upb_fielddef *f, const char *name, upb_status *s)
bool upb_handlerattr_setalwaysok(upb_handlerattr *attr, bool alwaysok)
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg)
UPB_INLINE bool upb_sink_endstr(upb_sink *s, upb_selector_t sel)
static size_t next(const upb_table *t, size_t i)
const UPB_BEGIN_EXTERN_C upb_msgdef * upbdefs_google_protobuf_DescriptorProto_get(const void *owner)
UPB_INLINE void upb_bufhandle_setbuf(upb_bufhandle *h, const char *buf, size_t ofs)
const UPB_INLINE google_protobuf_OneofDescriptorProto *const * google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len)
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg)
UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg)
bool upb_env_ok(const upb_env *e)
UPB_BEGIN_EXTERN_C upb_pbdecoder * upb_pbdecoder_create(upb_env *e, const upb_pbdecodermethod *method, upb_sink *output)
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_MethodOptions_f_deprecated(const upb_msgdef *m)
const char * kPbDecoderStackOverflow
size_t upb_pbdecoder_suspend(upb_pbdecoder *d)
upb_bytessink * upb_bufsink_sink(upb_bufsink *sink)
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg)
UPB_INLINE void * _upb_array_resize_accessor(void *msg, size_t ofs, size_t size, size_t elem_size, upb_fieldtype_t type, upb_arena *arena)
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldDescriptorProto_f_type(const upb_msgdef *m)
GLsizei const GLfloat * value
@ UPB_DESCRIPTOR_TYPE_UINT64
const UPB_INLINE void * upb_bufhandle_obj(const upb_bufhandle *h)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldOptions_f_jstype(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg)
upb_pb_encoder * upb_pb_encoder_create(upb_env *e, const upb_handlers *h, upb_bytessink *output)
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions *value)
UPB_INLINE bool upb_sink_endsubmsg(upb_sink *s, upb_selector_t sel)
bool upb_symtab_addfile(upb_symtab *s, upb_filedef *file, upb_status *status)
UPB_INLINE bool upb_strtable_remove2(upb_strtable *t, const char *key, size_t len, upb_value *val)
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, google_protobuf_FieldOptions_CType value)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_SourceCodeInfo_Location_f_leading_detached_comments(const upb_msgdef *m)
bool upb_fielddef_istagdelim(const upb_fielddef *f)
size_t upb_fielddef_getjsonname(const upb_fielddef *f, char *buf, size_t len)
const upb_msgdef * upb_fielddef_containingtype(const upb_fielddef *f)
const UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg)
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value)
const char * upb_enumdef_iton(const upb_enumdef *e, int32_t num)
bool upb_map_del(upb_map *map, upb_msgval key)
static upb_pb_encoder_segment * top(upb_pb_encoder *e)
const upb_json_parsermethod const upb_symtab upb_sink * output
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumDescriptorProto_f_options(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg)
UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg)
void upb_textprinter_setsingleline(upb_textprinter *p, bool single_line)
int upb_enumdef_numvals(const upb_enumdef *e)
UPB_INLINE bool upb_sink_endseq(upb_sink *s, upb_selector_t sel)
#define UPB_DECLARE_TYPE(cppname, cname)
upb_array * upb_array_new(upb_fieldtype_t type, upb_arena *a)
bool upb_fielddef_checkdescriptortype(int32_t type)
upb_intfmt_t upb_fielddef_intfmt(const upb_fielddef *f)
const upb_msgdef * upbdefs_google_protobuf_ServiceOptions_get(const void *owner)
bool upb_inttable_lookupptr(const upb_inttable *t, const void *key, upb_value *val)
bool upb_filedef_setname(upb_filedef *f, const char *name, upb_status *s)
const upb_enumdef * enumdef
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value)
const char * upb_filedef_package(const upb_filedef *f)
bool upb_handlerattr_setreturnclosuretype(upb_handlerattr *attr, const void *type)
UPB_BEGIN_EXTERN_C const struct upb_refcounted_vtbl upb_fielddef_vtbl
upb_filedef ** upb_loaddescriptor(const char *buf, size_t n, const void *owner, upb_status *status)
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_strview value)
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FieldOptions_f_ctype(const upb_msgdef *m)
size_t upb_map_size(const upb_map *map)
bool upb_mapiter_done(const upb_mapiter *i)
UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx)
const char * upb_fielddef_fullname(const upb_fielddef *f)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileOptions_f_java_multiple_files(const upb_msgdef *m)
UPB_INLINE bool upbdefs_google_protobuf_FieldOptions_JSType_is(const upb_enumdef *e)
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value)
@ google_protobuf_FieldDescriptorProto_TYPE_BYTES
const upb_tabent * entries
UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg)
void upb_env_free(upb_env *e, void *ptr)
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_strview value)
bool upb_strtable_remove3(upb_strtable *t, const char *key, size_t len, upb_value *val, upb_alloc *alloc)
UPB_INLINE bool upb_sink_putunknown(upb_sink *s, const char *buf, size_t n)
static uint32_t * group(tarjan *t, upb_refcounted *r)
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions *value)
#define FUNCS(name, membername, type_t, converter, proto_type)
GLboolean GLboolean GLboolean GLboolean a
UPB_INLINE google_protobuf_MethodDescriptorProto ** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto *msg, size_t *len)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_DescriptorProto_f_reserved_name(const upb_msgdef *m)
google_protobuf_FileOptions_OptimizeMode
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg)
void upb_strtable_packedsize(const upb_strtable *t, size_t *size)
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions *value)
UPB_INLINE upb_fielddef * upb_msgdef_itof_mutable(upb_msgdef *m, uint32_t i)
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_strview val, upb_arena *arena)
const UPB_INLINE google_protobuf_FileDescriptorProto *const * google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg, size_t *len)
size_t upb_pbdecoder_decode(void *closure, const void *hd, const char *buf, size_t size, const upb_bufhandle *handle)
UPB_INLINE bool upbdefs_google_protobuf_FieldOptions_CType_is(const upb_enumdef *e)
const upb_msglayout * upb_msgfactory_getlayout(upb_msgfactory *f, const upb_msgdef *m)
bool upb_mapiter_isequal(const upb_mapiter *i1, const upb_mapiter *i2)
int32_t upb_pbdecoder_decode_f32(upb_pbdecoder *d, uint32_t *u32)
size_t upb_filedef_depcount(const upb_filedef *f)
@ google_protobuf_FieldDescriptorProto_TYPE_STRING
const upb_msgdef * upbdefs_google_protobuf_MethodOptions_get(const void *owner)
static int32_t skip(upb_pbdecoder *d, size_t bytes)
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_EnumDescriptorProto_f_name(const upb_msgdef *m)
UPB_INLINE struct google_protobuf_FieldDescriptorProto * google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
UPB_INLINE int32_t upb_zzdec_32(uint32_t n)
UPB_INLINE struct google_protobuf_MethodOptions * google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena)
upb_fielddef * upb_fielddef_new(const void *owner)
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg)
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange ** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto *msg, size_t *len)
upb_msgdef * upb_msgdef_new(const void *owner)
bool upb_fielddef_isextension(const upb_fielddef *f)
UPB_INLINE int32_t const * google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len)
const upb_msgdef * upbdefs_google_protobuf_FileOptions_get(const void *owner)
const upb_def * upb_filedef_def(const upb_filedef *f, size_t i)
upb_enumdef * upb_enumdef_new(const void *owner)
const upb_msgdef * upbdefs_google_protobuf_EnumValueOptions_get(const void *owner)
@ UPB_DESCRIPTOR_TYPE_SINT32
const upb_msglayout google_protobuf_MethodDescriptorProto_msginit
struct google_protobuf_OneofOptions google_protobuf_OneofOptions
UPB_INLINE char * google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len)
UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
const UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg)
void * upb_startfield_handlerfunc(void *c, const void *hd)
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg)
UPB_INLINE bool upbdefs_google_protobuf_SourceCodeInfo_Location_is(const upb_msgdef *m)
@ google_protobuf_FieldOptions_STRING_PIECE
UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_strview value)
const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit
char * upb_strdup(const char *s, upb_alloc *a)
struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_strview value)
FieldDescriptorProto * AddExtension(FileDescriptorProto *file, const std::string &extendee, const std::string &name, int number, FieldDescriptorProto::Label label, FieldDescriptorProto::Type type)
bool upb_pbdecoder_setmaxnesting(upb_pbdecoder *d, size_t max)
upb_filedef * upb_descreader_file(const upb_descreader *r, size_t i)
const Descriptor::ReservedRange const EnumValueDescriptor method
bool upb_handlerattr_setclosuretype(upb_handlerattr *attr, const void *type)
UPB_INLINE bool upb_tabent_isempty(const upb_tabent *e)
const upb_msgdef * upbdefs_google_protobuf_EnumValueDescriptorProto_get(const void *owner)
GLfloat GLfloat GLfloat GLfloat h
UPB_INLINE bool upb_filedef_addenum(upb_filedef *f, upb_enumdef *e, const void *ref_donor, upb_status *s)
const upb_fielddef * upb_oneofdef_itof(const upb_oneofdef *o, uint32_t num)
UPB_INLINE void upb_bufhandle_setobj(upb_bufhandle *h, const void *obj, const void *type)
zend_class_entry * descriptor_type
UPB_INLINE struct google_protobuf_EnumOptions * google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena)
UPB_INLINE bool upb_sink_startsubmsg(upb_sink *s, upb_selector_t sel, upb_sink *sub)
const upb_def * upb_symtab_iter_def(const upb_symtab_iter *iter)
const uint8_t upb_pb_native_wire_types[]
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern array
bool upb_byteshandler_setstring(upb_byteshandler *h, upb_string_handlerfunc *func, void *d)
bool upb_inttable_removeptr(upb_inttable *t, const void *key, upb_value *val)
const UPB_INLINE void * _upb_array_accessor(const void *msg, size_t ofs, size_t *size)
UPB_INLINE char * google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len)
void upb_inttable_next(upb_inttable_iter *i)
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len)
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value)
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_arena *arena)
UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg)
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions *value)
UPB_INLINE bool upbdefs_google_protobuf_EnumValueDescriptorProto_is(const upb_msgdef *m)
UPB_INLINE bool upb_enumdef_ntoiz(const upb_enumdef *e, const char *name, int32_t *num)
void * upb_env_malloc(upb_env *e, size_t size)
int upb_msgdef_numfields(const upb_msgdef *m)
UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg)
@ google_protobuf_FieldDescriptorProto_TYPE_INT64
const UPB_INLINE upb_fielddef * upbdefs_google_protobuf_FileDescriptorProto_f_package(const upb_msgdef *m)
const upb_msgdef * upbdefs_google_protobuf_SourceCodeInfo_get(const void *owner)
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value)
UPB_INLINE struct google_protobuf_EnumDescriptorProto * google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto *msg, upb_arena *arena)
void upb_pbcodecache_init(upb_pbcodecache *c)
void upb_pbcodecache_uninit(upb_pbcodecache *c)
bool upb_handlers_setuint32(upb_handlers *h, const upb_fielddef *f, upb_uint32_handlerfunc *func, upb_handlerattr *attr)
const upb_msgdef * upbdefs_google_protobuf_MethodDescriptorProto_get(const void *owner)
UPB_INLINE upb_strview const * google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg, size_t *len)
UPB_INLINE struct google_protobuf_FieldDescriptorProto * google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_arena *arena)
void upb_fielddef_setdefaultfloat(upb_fielddef *f, float val)
upb_fieldtype_t upb_fielddef_type(const upb_fielddef *f)
void upb_symtab_free(upb_symtab *s)
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:01