php/ext/google/protobuf/upb.h
Go to the documentation of this file.
1 /* Amalgamated source file */
2 
3 // php.h intentionally defined NDEBUG. We have to define this macro in order to
4 // be used together with php.h
5 #ifndef NDEBUG
6 #define NDEBUG
7 #endif
8 
9 #include <stdint.h>
10 #ifndef UINTPTR_MAX
11 #error must include stdint.h first
12 #endif
13 
14 #if UINTPTR_MAX == 0xffffffff
15 #define UPB_SIZE(size32, size64) size32
16 #else
17 #define UPB_SIZE(size32, size64) size64
18 #endif
19 
20 #define UPB_FIELD_AT(msg, fieldtype, offset) \
21  *(fieldtype*)((const char*)(msg) + offset)
22 
23 #define UPB_READ_ONEOF(msg, fieldtype, offset, case_offset, case_val, default) \
24  UPB_FIELD_AT(msg, int, case_offset) == case_val \
25  ? UPB_FIELD_AT(msg, fieldtype, offset) \
26  : default
27 
28 #define UPB_WRITE_ONEOF(msg, fieldtype, offset, value, case_offset, case_val) \
29  UPB_FIELD_AT(msg, int, case_offset) = case_val; \
30  UPB_FIELD_AT(msg, fieldtype, offset) = value;
31 /*
32 ** upb::Message is a representation for protobuf messages.
33 **
34 ** However it differs from other common representations like
35 ** google::protobuf::Message in one key way: it does not prescribe any
36 ** ownership between messages and submessages, and it relies on the
37 ** client to ensure that each submessage/array/map outlives its parent.
38 **
39 ** All messages, arrays, and maps live in an Arena. If the entire message
40 ** tree is in the same arena, ensuring proper lifetimes is simple. However
41 ** the client can mix arenas as long as they ensure that there are no
42 ** dangling pointers.
43 **
44 ** A client can access a upb::Message without knowing anything about
45 ** ownership semantics, but to create or mutate a message a user needs
46 ** to implement the memory management themselves.
47 **
48 ** TODO: UTF-8 checking?
49 **/
50 
51 #ifndef UPB_MSG_H_
52 #define UPB_MSG_H_
53 
54 #include <stdint.h>
55 #include <string.h>
56 /*
57 ** This file contains shared definitions that are widely used across upb.
58 **
59 ** This is a mixed C/C++ interface that offers a full API to both languages.
60 ** See the top-level README for more information.
61 */
62 
63 #ifndef UPB_H_
64 #define UPB_H_
65 
66 #include <assert.h>
67 #include <stdarg.h>
68 #include <stdbool.h>
69 #include <stddef.h>
70 #include <stdint.h>
71 
72 #ifdef __cplusplus
73 #include <memory>
74 namespace upb {
75 class Arena;
76 class Status;
77 template <int N> class InlinedArena;
78 }
79 #endif
80 
81 /* UPB_INLINE: inline if possible, emit standalone code if required. */
82 #ifdef __cplusplus
83 #define UPB_INLINE inline
84 #elif defined (__GNUC__)
85 #define UPB_INLINE static __inline__
86 #else
87 #define UPB_INLINE static
88 #endif
89 
90 /* Hints to the compiler about likely/unlikely branches. */
91 #define UPB_LIKELY(x) __builtin_expect((x),1)
92 
93 /* Define UPB_BIG_ENDIAN manually if you're on big endian and your compiler
94  * doesn't provide these preprocessor symbols. */
95 #if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
96 #define UPB_BIG_ENDIAN
97 #endif
98 
99 /* Macros for function attributes on compilers that support them. */
100 #ifdef __GNUC__
101 #define UPB_FORCEINLINE __inline__ __attribute__((always_inline))
102 #define UPB_NOINLINE __attribute__((noinline))
103 #define UPB_NORETURN __attribute__((__noreturn__))
104 #else /* !defined(__GNUC__) */
105 #define UPB_FORCEINLINE
106 #define UPB_NOINLINE
107 #define UPB_NORETURN
108 #endif
109 
110 #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
111 /* C99/C++11 versions. */
112 #include <stdio.h>
113 #define _upb_snprintf snprintf
114 #define _upb_vsnprintf vsnprintf
115 #define _upb_va_copy(a, b) va_copy(a, b)
116 #elif defined __GNUC__
117 /* A few hacky workarounds for functions not in C89.
118  * For internal use only!
119  * TODO(haberman): fix these by including our own implementations, or finding
120  * another workaround.
121  */
122 #define _upb_snprintf __builtin_snprintf
123 #define _upb_vsnprintf __builtin_vsnprintf
124 #define _upb_va_copy(a, b) __va_copy(a, b)
125 #else
126 #error Need implementations of [v]snprintf and va_copy
127 #endif
128 
129 #ifdef __cplusplus
130 #if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || \
131  (defined(_MSC_VER) && _MSC_VER >= 1900)
132 // C++11 is present
133 #else
134 #error upb requires C++11 for C++ support
135 #endif
136 #endif
137 
138 #define UPB_MAX(x, y) ((x) > (y) ? (x) : (y))
139 #define UPB_MIN(x, y) ((x) < (y) ? (x) : (y))
140 
141 #define UPB_UNUSED(var) (void)var
142 
143 /* UPB_ASSERT(): in release mode, we use the expression without letting it be
144  * evaluated. This prevents "unused variable" warnings. */
145 #ifdef NDEBUG
146 #define UPB_ASSERT(expr) do {} while (false && (expr))
147 #else
148 #define UPB_ASSERT(expr) assert(expr)
149 #endif
150 
151 /* UPB_ASSERT_DEBUGVAR(): assert that uses functions or variables that only
152  * exist in debug mode. This turns into regular assert. */
153 #define UPB_ASSERT_DEBUGVAR(expr) assert(expr)
154 
155 #ifdef __GNUC__
156 #define UPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0)
157 #else
158 #define UPB_UNREACHABLE() do { assert(0); } while(0)
159 #endif
160 
161 /* upb_status *****************************************************************/
162 
163 /* upb_status represents a success or failure status and error message.
164  * It owns no resources and allocates no memory, so it should work
165  * even in OOM situations. */
166 
167 /* The maximum length of an error message before it will get truncated. */
168 #define UPB_STATUS_MAX_MESSAGE 127
169 
170 typedef struct {
171  bool ok;
172  char msg[UPB_STATUS_MAX_MESSAGE]; /* Error message; NULL-terminated. */
173 } upb_status;
174 
175 #ifdef __cplusplus
176 extern "C" {
177 #endif
178 
179 const char *upb_status_errmsg(const upb_status *status);
180 bool upb_ok(const upb_status *status);
181 
182 /* Any of the functions that write to a status object allow status to be NULL,
183  * to support use cases where the function's caller does not care about the
184  * status message. */
185 void upb_status_clear(upb_status *status);
186 void upb_status_seterrmsg(upb_status *status, const char *msg);
187 void upb_status_seterrf(upb_status *status, const char *fmt, ...);
188 void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args);
189 
191  upb_status_seterrmsg(status, "out of memory");
192 }
193 
194 #ifdef __cplusplus
195 } /* extern "C" */
196 
197 class upb::Status {
198  public:
200 
201  upb_status* ptr() { return &status_; }
202 
203  /* Returns true if there is no error. */
204  bool ok() const { return upb_ok(&status_); }
205 
206  /* Guaranteed to be NULL-terminated. */
207  const char *error_message() const { return upb_status_errmsg(&status_); }
208 
209  /* The error message will be truncated if it is longer than
210  * UPB_STATUS_MAX_MESSAGE-4. */
211  void SetErrorMessage(const char *msg) { upb_status_seterrmsg(&status_, msg); }
212  void SetFormattedErrorMessage(const char *fmt, ...) {
213  va_list args;
214  va_start(args, fmt);
216  va_end(args);
217  }
218 
219  /* Resets the status to a successful state with no message. */
220  void Clear() { upb_status_clear(&status_); }
221 
222  private:
224 };
225 
226 #endif /* __cplusplus */
227 
230 /* A upb_alloc is a possibly-stateful allocator object.
231  *
232  * It could either be an arena allocator (which doesn't require individual
233  * free() calls) or a regular malloc() (which does). The client must therefore
234  * free memory unless it knows that the allocator is an arena allocator. */
235 
236 struct upb_alloc;
237 typedef struct upb_alloc upb_alloc;
238 
239 /* A malloc()/free() function.
240  * If "size" is 0 then the function acts like free(), otherwise it acts like
241  * realloc(). Only "oldsize" bytes from a previous allocation are preserved. */
242 typedef void *upb_alloc_func(upb_alloc *alloc, void *ptr, size_t oldsize,
243  size_t size);
244 
245 struct upb_alloc {
247 };
248 
249 UPB_INLINE void *upb_malloc(upb_alloc *alloc, size_t size) {
250  UPB_ASSERT(alloc);
251  return alloc->func(alloc, NULL, 0, size);
252 }
253 
254 UPB_INLINE void *upb_realloc(upb_alloc *alloc, void *ptr, size_t oldsize,
255  size_t size) {
256  UPB_ASSERT(alloc);
257  return alloc->func(alloc, ptr, oldsize, size);
258 }
259 
260 UPB_INLINE void upb_free(upb_alloc *alloc, void *ptr) {
261  assert(alloc);
262  alloc->func(alloc, ptr, 0, 0);
263 }
264 
265 /* The global allocator used by upb. Uses the standard malloc()/free(). */
266 
268 
269 /* Functions that hard-code the global malloc.
270  *
271  * We still get benefit because we can put custom logic into our global
272  * allocator, like injecting out-of-memory faults in debug/testing builds. */
273 
274 UPB_INLINE void *upb_gmalloc(size_t size) {
275  return upb_malloc(&upb_alloc_global, size);
276 }
277 
278 UPB_INLINE void *upb_grealloc(void *ptr, size_t oldsize, size_t size) {
279  return upb_realloc(&upb_alloc_global, ptr, oldsize, size);
280 }
281 
282 UPB_INLINE void upb_gfree(void *ptr) {
283  upb_free(&upb_alloc_global, ptr);
284 }
285 
286 /* upb_arena ******************************************************************/
287 
288 /* upb_arena is a specific allocator implementation that uses arena allocation.
289  * The user provides an allocator that will be used to allocate the underlying
290  * arena blocks. Arenas by nature do not require the individual allocations
291  * to be freed. However the Arena does allow users to register cleanup
292  * functions that will run when the arena is destroyed.
293  *
294  * A upb_arena is *not* thread-safe.
295  *
296  * You could write a thread-safe arena allocator that satisfies the
297  * upb_alloc interface, but it would not be as efficient for the
298  * single-threaded case. */
299 
300 typedef void upb_cleanup_func(void *ud);
301 
302 struct upb_arena;
303 typedef struct upb_arena upb_arena;
304 
305 #ifdef __cplusplus
306 extern "C" {
307 #endif
308 
309 /* Creates an arena from the given initial block (if any -- n may be 0).
310  * Additional blocks will be allocated from |alloc|. If |alloc| is NULL, this
311  * is a fixed-size arena and cannot grow. */
312 upb_arena *upb_arena_init(void *mem, size_t n, upb_alloc *alloc);
313 void upb_arena_free(upb_arena *a);
315 size_t upb_arena_bytesallocated(const upb_arena *a);
316 
318 
319 /* Convenience wrappers around upb_alloc functions. */
320 
322  return upb_malloc(upb_arena_alloc(a), size);
323 }
324 
325 UPB_INLINE void *upb_arena_realloc(upb_arena *a, void *ptr, size_t oldsize,
326  size_t size) {
327  return upb_realloc(upb_arena_alloc(a), ptr, oldsize, size);
328 }
329 
331  return upb_arena_init(NULL, 0, &upb_alloc_global);
332 }
333 
334 #ifdef __cplusplus
335 } /* extern "C" */
336 
337 class upb::Arena {
338  public:
339  /* A simple arena with no initial memory block and the default allocator. */
340  Arena() : ptr_(upb_arena_new(), upb_arena_free) {}
341 
342  upb_arena* ptr() { return ptr_.get(); }
343 
344  /* Allows this arena to be used as a generic allocator.
345  *
346  * The arena does not need free() calls so when using Arena as an allocator
347  * it is safe to skip them. However they are no-ops so there is no harm in
348  * calling free() either. */
349  upb_alloc *allocator() { return upb_arena_alloc(ptr_.get()); }
350 
351  /* Add a cleanup function to run when the arena is destroyed.
352  * Returns false on out-of-memory. */
353  bool AddCleanup(void *ud, upb_cleanup_func* func) {
354  return upb_arena_addcleanup(ptr_.get(), ud, func);
355  }
356 
357  /* Total number of bytes that have been allocated. It is undefined what
358  * Realloc() does to &arena_ counter. */
359  size_t BytesAllocated() const { return upb_arena_bytesallocated(ptr_.get()); }
360 
361  private:
362  std::unique_ptr<upb_arena, decltype(&upb_arena_free)> ptr_;
363 };
364 
365 #endif
366 
367 /* upb::InlinedArena **********************************************************/
368 
369 /* upb::InlinedArena seeds the arenas with a predefined amount of memory. No
370  * heap memory will be allocated until the initial block is exceeded.
371  *
372  * These types only exist in C++ */
373 
374 #ifdef __cplusplus
375 
376 template <int N> class upb::InlinedArena : public upb::Arena {
377  public:
378  InlinedArena() : ptr_(upb_arena_new(&initial_block_, N, &upb_alloc_global)) {}
379 
380  upb_arena* ptr() { return ptr_.get(); }
381 
382  private:
383  InlinedArena(const InlinedArena*) = delete;
384  InlinedArena& operator=(const InlinedArena*) = delete;
385 
386  std::unique_ptr<upb_arena, decltype(&upb_arena_free)> ptr_;
387  char initial_block_[N];
388 };
389 
390 #endif /* __cplusplus */
391 
392 /* Constants ******************************************************************/
393 
394 /* Generic function type. */
395 typedef void upb_func();
396 
397 /* A list of types as they are encoded on-the-wire. */
398 typedef enum {
406 
407 /* The types a field can have. Note that this list is not identical to the
408  * types defined in descriptor.proto, which gives INT32 and SINT32 separate
409  * types (we distinguish the two with the "integer encoding" enum below). */
410 typedef enum {
411  /* Types stored in 1 byte. */
413  /* Types stored in 4 bytes. */
417  UPB_TYPE_ENUM = 5, /* Enum values are int32. */
418  /* Types stored as pointers (probably 4 or 8 bytes). */
422  /* Types stored as 8 bytes. */
427 
428 /* The repeated-ness of each field; this matches descriptor.proto. */
429 typedef enum {
433 } upb_label_t;
434 
435 /* Descriptor types, as defined in descriptor.proto. */
436 typedef enum {
456 
457 extern const uint8_t upb_desctype_to_fieldtype[];
458 
459 #endif /* UPB_H_ */
460 /*
461 ** structs.int.h: structures definitions that are internal to upb.
462 */
463 
464 #ifndef UPB_STRUCTS_H_
465 #define UPB_STRUCTS_H_
466 
467 
468 struct upb_array {
470  uint8_t element_size;
471  void *data; /* Each element is element_size. */
472  size_t len; /* Measured in elements. */
473  size_t size; /* Measured in elements. */
475 };
476 
477 #endif /* UPB_STRUCTS_H_ */
478 
479 
480 #ifdef __cplusplus
481 
482 namespace upb {
483 class Array;
484 class Map;
485 class MapIterator;
486 class MessageLayout;
487 }
488 
489 #endif
490 
491 /* TODO(haberman): C++ accessors */
492 
493 #ifdef __cplusplus
494 extern "C" {
495 #endif
496 
497 typedef void upb_msg;
498 
499 struct upb_array;
500 typedef struct upb_array upb_array;
501 
502 struct upb_map;
503 typedef struct upb_map upb_map;
504 
505 struct upb_mapiter;
506 typedef struct upb_mapiter upb_mapiter;
507 
510 /* upb_msglayout represents the memory layout of a given upb_msgdef. The
511  * members are public so generated code can initialize them, but users MUST NOT
512  * read or write any of its members. */
513 
514 typedef struct {
515  uint32_t number;
516  uint16_t offset;
517  int16_t presence; /* If >0, hasbit_index+1. If <0, oneof_index+1. */
518  uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */
519  uint8_t descriptortype;
520  uint8_t label;
522 
523 typedef struct upb_msglayout {
524  const struct upb_msglayout *const* submsgs;
526  /* Must be aligned to sizeof(void*). Doesn't include internal members like
527  * unknown fields, extension dict, pointer to msglayout, etc. */
528  uint16_t size;
529  uint16_t field_count;
531 } upb_msglayout;
532 
535 typedef struct {
536  const char *data;
537  size_t size;
538 } upb_strview;
539 
541  upb_strview ret;
542  ret.data = data;
543  ret.size = size;
544  return ret;
545 }
546 
548  return upb_strview_make(data, strlen(data));
549 }
550 
552  return a.size == b.size && memcmp(a.data, b.data, a.size) == 0;
553 }
554 
555 #define UPB_STRVIEW_INIT(ptr, len) {ptr, len}
556 
557 #define UPB_STRVIEW_FORMAT "%.*s"
558 #define UPB_STRVIEW_ARGS(view) (int)(view).size, (view).data
559 
562 /* A union representing all possible protobuf values. Used for generic get/set
563  * operations. */
564 
565 typedef union {
566  bool b;
567  float flt;
568  double dbl;
569  int32_t i32;
570  int64_t i64;
571  uint32_t u32;
572  uint64_t u64;
573  const upb_map* map;
574  const upb_msg* msg;
575  const upb_array* arr;
576  const void* ptr;
578 } upb_msgval;
579 
580 #define ACCESSORS(name, membername, ctype) \
581  UPB_INLINE ctype upb_msgval_get ## name(upb_msgval v) { \
582  return v.membername; \
583  } \
584  UPB_INLINE void upb_msgval_set ## name(upb_msgval *v, ctype cval) { \
585  v->membername = cval; \
586  } \
587  UPB_INLINE upb_msgval upb_msgval_ ## name(ctype v) { \
588  upb_msgval ret; \
589  ret.membername = v; \
590  return ret; \
591  }
592 
593 ACCESSORS(bool, b, bool)
594 ACCESSORS(float, flt, float)
595 ACCESSORS(double, dbl, double)
596 ACCESSORS(int32, i32, int32_t)
597 ACCESSORS(int64, i64, int64_t)
598 ACCESSORS(uint32, u32, uint32_t)
599 ACCESSORS(uint64, u64, uint64_t)
600 ACCESSORS(map, map, const upb_map*)
601 ACCESSORS(msg, msg, const upb_msg*)
602 ACCESSORS(ptr, ptr, const void*)
603 ACCESSORS(arr, arr, const upb_array*)
605 
606 #undef ACCESSORS
607 
609  return upb_msgval_str(upb_strview_make(data, size));
610 }
611 
614 /* A upb_msg represents a protobuf message. It always corresponds to a specific
615  * upb_msglayout, which describes how it is laid out in memory. */
616 
617 /* Creates a new message of the given type/layout in this arena. */
619 
620 /* Returns the arena for the given message. */
621 upb_arena *upb_msg_arena(const upb_msg *msg);
622 
623 void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len);
624 const char *upb_msg_getunknown(const upb_msg *msg, size_t *len);
625 
626 /* Read-only message API. Can be safely called by anyone. */
627 
628 /* Returns the value associated with this field:
629  * - for scalar fields (including strings), the value directly.
630  * - return upb_msg*, or upb_map* for msg/map.
631  * If the field is unset for these field types, returns NULL.
632  *
633  * TODO(haberman): should we let users store cached array/map/msg
634  * pointers here for fields that are unset? Could be useful for the
635  * strongly-owned submessage model (ie. generated C API that doesn't use
636  * arenas).
637  */
638 upb_msgval upb_msg_get(const upb_msg *msg,
639  int field_index,
640  const upb_msglayout *l);
641 
642 /* May only be called for fields where upb_fielddef_haspresence(f) == true. */
643 bool upb_msg_has(const upb_msg *msg,
644  int field_index,
645  const upb_msglayout *l);
646 
647 /* Mutable message API. May only be called by the owner of the message who
648  * knows its ownership scheme and how to keep it consistent. */
649 
650 /* Sets the given field to the given value. Does not perform any memory
651  * management: if you overwrite a pointer to a msg/array/map/string without
652  * cleaning it up (or using an arena) it will leak.
653  */
654 void upb_msg_set(upb_msg *msg,
655  int field_index,
656  upb_msgval val,
657  const upb_msglayout *l);
658 
659 /* For a primitive field, set it back to its default. For repeated, string, and
660  * submessage fields set it back to NULL. This could involve releasing some
661  * internal memory (for example, from an extension dictionary), but it is not
662  * recursive in any way and will not recover any memory that may be used by
663  * arrays/maps/strings/msgs that this field may have pointed to.
664  */
665 bool upb_msg_clearfield(upb_msg *msg,
666  int field_index,
667  const upb_msglayout *l);
668 
669 /* TODO(haberman): copyfrom()/mergefrom()? */
670 
673 /* A upb_array stores data for a repeated field. The memory management
674  * semantics are the same as upb_msg. A upb_array allocates dynamic
675  * memory internally for the array elements. */
676 
679 
680 /* Read-only interface. Safe for anyone to call. */
681 
682 size_t upb_array_size(const upb_array *arr);
683 upb_msgval upb_array_get(const upb_array *arr, size_t i);
684 
685 /* Write interface. May only be called by the message's owner who can enforce
686  * its memory management invariants. */
687 
688 bool upb_array_set(upb_array *arr, size_t i, upb_msgval val);
689 
692 /* A upb_map stores data for a map field. The memory management semantics are
693  * the same as upb_msg, with one notable exception. upb_map will internally
694  * store a copy of all string keys, but *not* any string values or submessages.
695  * So you must ensure that any string or message values outlive the map, and you
696  * must delete them manually when they are no longer required. */
697 
699  upb_arena *a);
700 
701 /* Read-only interface. Safe for anyone to call. */
702 
703 size_t upb_map_size(const upb_map *map);
707 
708 /* Write interface. May only be called by the message's owner who can enforce
709  * its memory management invariants. */
710 
711 /* Sets or overwrites an entry in the map. Return value indicates whether
712  * the operation succeeded or failed with OOM, and also whether an existing
713  * key was replaced or not. */
714 bool upb_map_set(upb_map *map,
716  upb_msgval *valremoved);
717 
718 /* Deletes an entry in the map. Returns true if the key was present. */
720 
723 /* For iterating over a map. Map iterators are invalidated by mutations to the
724  * map, but an invalidated iterator will never return junk or crash the process.
725  * An invalidated iterator may return entries that were already returned though,
726  * and if you keep invalidating the iterator during iteration, the program may
727  * enter an infinite loop. */
728 
729 size_t upb_mapiter_sizeof();
730 
731 void upb_mapiter_begin(upb_mapiter *i, const upb_map *t);
735 bool upb_mapiter_done(const upb_mapiter *i);
736 
740 bool upb_mapiter_isequal(const upb_mapiter *i1, const upb_mapiter *i2);
741 
742 #ifdef __cplusplus
743 } /* extern "C" */
744 #endif
745 
746 #endif /* UPB_MSG_H_ */
747 /* This file was generated by upbc (the upb compiler) from the input
748  * file:
749  *
750  * google/protobuf/descriptor.proto
751  *
752  * Do not edit -- your changes will be discarded when the file is
753  * regenerated. */
754 
755 #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
756 #define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_
757 
758 /*
759 ** Functions for use by generated code. These are not public and users must
760 ** not call them directly.
761 */
762 
763 #ifndef UPB_GENERATED_UTIL_H_
764 #define UPB_GENERATED_UTIL_H_
765 
766 #include <stdint.h>
767 
768 #define PTR_AT(msg, ofs, type) (type*)((const char*)msg + ofs)
769 
770 UPB_INLINE const void *_upb_array_accessor(const void *msg, size_t ofs,
771  size_t *size) {
772  const upb_array *arr = *PTR_AT(msg, ofs, const upb_array*);
773  if (arr) {
774  if (size) *size = arr->len;
775  return arr->data;
776  } else {
777  if (size) *size = 0;
778  return NULL;
779  }
780 }
781 
782 UPB_INLINE void *_upb_array_mutable_accessor(void *msg, size_t ofs,
783  size_t *size) {
784  upb_array *arr = *PTR_AT(msg, ofs, upb_array*);
785  if (arr) {
786  if (size) *size = arr->len;
787  return arr->data;
788  } else {
789  if (size) *size = 0;
790  return NULL;
791  }
792 }
793 
794 /* TODO(haberman): this is a mess. It will improve when upb_array no longer
795  * carries reflective state (type, elem_size). */
796 UPB_INLINE void *_upb_array_resize_accessor(void *msg, size_t ofs, size_t size,
797  size_t elem_size,
799  upb_arena *arena) {
800  upb_array *arr = *PTR_AT(msg, ofs, upb_array*);
801 
802  if (!arr) {
803  arr = upb_array_new(type, arena);
804  if (!arr) return NULL;
805  *PTR_AT(msg, ofs, upb_array*) = arr;
806  }
807 
808  if (size > arr->size) {
809  size_t new_size = UPB_MAX(arr->size, 4);
810  size_t old_bytes = arr->size * elem_size;
811  size_t new_bytes;
812  while (new_size < size) new_size *= 2;
813  new_bytes = new_size * elem_size;
814  arr->data = upb_arena_realloc(arena, arr->data, old_bytes, new_bytes);
815  if (!arr->data) {
816  return NULL;
817  }
818  arr->size = new_size;
819  }
820 
821  arr->len = size;
822  return arr->data;
823 }
824 
825 UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs,
826  size_t elem_size,
828  const void *value,
829  upb_arena *arena) {
830  upb_array *arr = *PTR_AT(msg, ofs, upb_array*);
831  size_t i = arr ? arr->len : 0;
832  void *data =
833  _upb_array_resize_accessor(msg, ofs, i + 1, elem_size, type, arena);
834  if (!data) return false;
835  memcpy(PTR_AT(data, i * elem_size, char), value, elem_size);
836  return true;
837 }
838 
839 UPB_INLINE bool _upb_has_field(const void *msg, size_t idx) {
840  return (*PTR_AT(msg, idx / 8, const char) & (1 << (idx % 8))) != 0;
841 }
842 
843 UPB_INLINE bool _upb_sethas(const void *msg, size_t idx) {
844  return (*PTR_AT(msg, idx / 8, char)) |= (1 << (idx % 8));
845 }
846 
847 UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx) {
848  return (*PTR_AT(msg, idx / 8, char)) &= ~(1 << (idx % 8));
849 }
850 
851 UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num) {
852  return *PTR_AT(msg, case_ofs, int32_t) == num;
853 }
854 
855 #undef PTR_AT
856 
857 #endif /* UPB_GENERATED_UTIL_H_ */
858 
859 
860 /*
861 ** upb_decode: parsing into a upb_msg using a upb_msglayout.
862 */
863 
864 #ifndef UPB_DECODE_H_
865 #define UPB_DECODE_H_
866 
867 
868 #ifdef __cplusplus
869 extern "C" {
870 #endif
871 
872 bool upb_decode(const char *buf, size_t size, upb_msg *msg,
873  const upb_msglayout *l);
874 
875 #ifdef __cplusplus
876 } /* extern "C" */
877 #endif
878 
879 #endif /* UPB_DECODE_H_ */
880 /*
881 ** upb_encode: parsing into a upb_msg using a upb_msglayout.
882 */
883 
884 #ifndef UPB_ENCODE_H_
885 #define UPB_ENCODE_H_
886 
887 
888 #ifdef __cplusplus
889 extern "C" {
890 #endif
891 
892 char *upb_encode(const void *msg, const upb_msglayout *l, upb_arena *arena,
893  size_t *size);
894 
895 #ifdef __cplusplus
896 } /* extern "C" */
897 #endif
898 
899 #endif /* UPB_ENCODE_H_ */
900 #ifdef __cplusplus
901 extern "C" {
902 #endif
903 
985 
986 /* Enums */
987 
988 typedef enum {
993 
994 typedef enum {
1014 
1015 typedef enum {
1020 
1021 typedef enum {
1026 
1027 typedef enum {
1032 
1033 typedef enum {
1038 
1039 
1040 /* google.protobuf.FileDescriptorSet */
1041 
1044 }
1046  upb_arena *arena) {
1048  return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit)) ? ret : NULL;
1049 }
1052 }
1053 
1055 
1058 }
1061 }
1065  msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1066  if (!ok) return NULL;
1067  return sub;
1068 }
1069 
1070 
1071 /* google.protobuf.FileDescriptorProto */
1072 
1075 }
1077  upb_arena *arena) {
1079  return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit)) ? ret : NULL;
1080 }
1083 }
1084 
1102 
1104  _upb_sethas(msg, 1);
1105  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
1106 }
1108  _upb_sethas(msg, 2);
1109  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value;
1110 }
1112  return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
1113 }
1115  return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
1116 }
1119  msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
1120 }
1123 }
1126 }
1130  msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1131  if (!ok) return NULL;
1132  return sub;
1133 }
1136 }
1139 }
1143  msg, UPB_SIZE(44, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1144  if (!ok) return NULL;
1145  return sub;
1146 }
1149 }
1152 }
1156  msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1157  if (!ok) return NULL;
1158  return sub;
1159 }
1162 }
1165 }
1169  msg, UPB_SIZE(52, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1170  if (!ok) return NULL;
1171  return sub;
1172 }
1174  _upb_sethas(msg, 4);
1176 }
1179  if (sub == NULL) {
1181  if (!sub) return NULL;
1183  }
1184  return sub;
1185 }
1187  _upb_sethas(msg, 5);
1189 }
1192  if (sub == NULL) {
1194  if (!sub) return NULL;
1196  }
1197  return sub;
1198 }
1200  return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 112), len);
1201 }
1203  return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 112), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
1204 }
1207  msg, UPB_SIZE(56, 112), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
1208 }
1210  return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 120), len);
1211 }
1213  return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(60, 120), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
1214 }
1217  msg, UPB_SIZE(60, 120), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
1218 }
1220  _upb_sethas(msg, 3);
1221  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value;
1222 }
1223 
1224 
1225 /* google.protobuf.DescriptorProto */
1226 
1229 }
1231  upb_arena *arena) {
1233  return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit)) ? ret : NULL;
1234 }
1237 }
1238 
1251 
1253  _upb_sethas(msg, 1);
1254  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
1255 }
1258 }
1261 }
1265  msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1266  if (!ok) return NULL;
1267  return sub;
1268 }
1271 }
1274 }
1278  msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1279  if (!ok) return NULL;
1280  return sub;
1281 }
1284 }
1287 }
1291  msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1292  if (!ok) return NULL;
1293  return sub;
1294 }
1297 }
1300 }
1304  msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1305  if (!ok) return NULL;
1306  return sub;
1307 }
1310 }
1313 }
1317  msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1318  if (!ok) return NULL;
1319  return sub;
1320 }
1322  _upb_sethas(msg, 2);
1324 }
1327  if (sub == NULL) {
1329  if (!sub) return NULL;
1331  }
1332  return sub;
1333 }
1336 }
1339 }
1343  msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1344  if (!ok) return NULL;
1345  return sub;
1346 }
1349 }
1352 }
1356  msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1357  if (!ok) return NULL;
1358  return sub;
1359 }
1361  return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
1362 }
1364  return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
1365 }
1368  msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
1369 }
1370 
1371 
1372 /* google.protobuf.DescriptorProto.ExtensionRange */
1373 
1376 }
1378  upb_arena *arena) {
1381 }
1384 }
1385 
1392 
1394  _upb_sethas(msg, 1);
1395  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
1396 }
1398  _upb_sethas(msg, 2);
1399  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
1400 }
1402  _upb_sethas(msg, 3);
1404 }
1407  if (sub == NULL) {
1409  if (!sub) return NULL;
1411  }
1412  return sub;
1413 }
1414 
1415 
1416 /* google.protobuf.DescriptorProto.ReservedRange */
1417 
1420 }
1422  upb_arena *arena) {
1425 }
1428 }
1429 
1434 
1436  _upb_sethas(msg, 1);
1437  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
1438 }
1440  _upb_sethas(msg, 2);
1441  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
1442 }
1443 
1444 
1445 /* google.protobuf.ExtensionRangeOptions */
1446 
1449 }
1451  upb_arena *arena) {
1453  return (ret && upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit)) ? ret : NULL;
1454 }
1457 }
1458 
1460 
1463 }
1466 }
1470  msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1471  if (!ok) return NULL;
1472  return sub;
1473 }
1474 
1475 
1476 /* google.protobuf.FieldDescriptorProto */
1477 
1480 }
1482  upb_arena *arena) {
1484  return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit)) ? ret : NULL;
1485 }
1488 }
1489 
1510 
1512  _upb_sethas(msg, 5);
1513  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value;
1514 }
1516  _upb_sethas(msg, 6);
1517  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value;
1518 }
1520  _upb_sethas(msg, 3);
1521  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value;
1522 }
1524  _upb_sethas(msg, 1);
1525  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
1526 }
1528  _upb_sethas(msg, 2);
1529  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value;
1530 }
1532  _upb_sethas(msg, 7);
1533  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value;
1534 }
1536  _upb_sethas(msg, 8);
1537  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)) = value;
1538 }
1540  _upb_sethas(msg, 10);
1542 }
1545  if (sub == NULL) {
1547  if (!sub) return NULL;
1549  }
1550  return sub;
1551 }
1553  _upb_sethas(msg, 4);
1554  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)) = value;
1555 }
1557  _upb_sethas(msg, 9);
1558  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)) = value;
1559 }
1560 
1561 
1562 /* google.protobuf.OneofDescriptorProto */
1563 
1566 }
1568  upb_arena *arena) {
1570  return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit)) ? ret : NULL;
1571 }
1574 }
1575 
1580 
1582  _upb_sethas(msg, 1);
1583  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
1584 }
1586  _upb_sethas(msg, 2);
1588 }
1591  if (sub == NULL) {
1593  if (!sub) return NULL;
1595  }
1596  return sub;
1597 }
1598 
1599 
1600 /* google.protobuf.EnumDescriptorProto */
1601 
1604 }
1606  upb_arena *arena) {
1608  return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit)) ? ret : NULL;
1609 }
1612 }
1613 
1621 
1623  _upb_sethas(msg, 1);
1624  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
1625 }
1628 }
1631 }
1635  msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1636  if (!ok) return NULL;
1637  return sub;
1638 }
1640  _upb_sethas(msg, 2);
1642 }
1645  if (sub == NULL) {
1647  if (!sub) return NULL;
1649  }
1650  return sub;
1651 }
1654 }
1657 }
1661  msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1662  if (!ok) return NULL;
1663  return sub;
1664 }
1666  return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
1667 }
1669  return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
1670 }
1673  msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
1674 }
1675 
1676 
1677 /* google.protobuf.EnumDescriptorProto.EnumReservedRange */
1678 
1681 }
1683  upb_arena *arena) {
1686 }
1689 }
1690 
1695 
1697  _upb_sethas(msg, 1);
1698  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
1699 }
1701  _upb_sethas(msg, 2);
1702  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
1703 }
1704 
1705 
1706 /* google.protobuf.EnumValueDescriptorProto */
1707 
1710 }
1712  upb_arena *arena) {
1714  return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit)) ? ret : NULL;
1715 }
1718 }
1719 
1726 
1728  _upb_sethas(msg, 2);
1729  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value;
1730 }
1732  _upb_sethas(msg, 1);
1733  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
1734 }
1736  _upb_sethas(msg, 3);
1738 }
1741  if (sub == NULL) {
1743  if (!sub) return NULL;
1745  }
1746  return sub;
1747 }
1748 
1749 
1750 /* google.protobuf.ServiceDescriptorProto */
1751 
1754 }
1756  upb_arena *arena) {
1758  return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit)) ? ret : NULL;
1759 }
1762 }
1763 
1769 
1771  _upb_sethas(msg, 1);
1772  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
1773 }
1776 }
1779 }
1783  msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1784  if (!ok) return NULL;
1785  return sub;
1786 }
1788  _upb_sethas(msg, 2);
1790 }
1793  if (sub == NULL) {
1795  if (!sub) return NULL;
1797  }
1798  return sub;
1799 }
1800 
1801 
1802 /* google.protobuf.MethodDescriptorProto */
1803 
1806 }
1808  upb_arena *arena) {
1810  return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit)) ? ret : NULL;
1811 }
1814 }
1815 
1828 
1830  _upb_sethas(msg, 3);
1831  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
1832 }
1834  _upb_sethas(msg, 4);
1835  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value;
1836 }
1838  _upb_sethas(msg, 5);
1839  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value;
1840 }
1842  _upb_sethas(msg, 6);
1844 }
1847  if (sub == NULL) {
1849  if (!sub) return NULL;
1851  }
1852  return sub;
1853 }
1855  _upb_sethas(msg, 1);
1856  UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
1857 }
1859  _upb_sethas(msg, 2);
1860  UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value;
1861 }
1862 
1863 
1864 /* google.protobuf.FileOptions */
1865 
1868 }
1870  upb_arena *arena) {
1872  return (ret && upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit)) ? ret : NULL;
1873 }
1875  return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
1876 }
1877 
1915 
1917  _upb_sethas(msg, 11);
1918  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)) = value;
1919 }
1921  _upb_sethas(msg, 12);
1922  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)) = value;
1923 }
1925  _upb_sethas(msg, 1);
1926  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
1927 }
1929  _upb_sethas(msg, 2);
1930  UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value;
1931 }
1933  _upb_sethas(msg, 13);
1934  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 64)) = value;
1935 }
1937  _upb_sethas(msg, 3);
1938  UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)) = value;
1939 }
1941  _upb_sethas(msg, 4);
1942  UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)) = value;
1943 }
1945  _upb_sethas(msg, 5);
1946  UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)) = value;
1947 }
1949  _upb_sethas(msg, 6);
1950  UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)) = value;
1951 }
1953  _upb_sethas(msg, 7);
1954  UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)) = value;
1955 }
1957  _upb_sethas(msg, 8);
1958  UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)) = value;
1959 }
1961  _upb_sethas(msg, 9);
1962  UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)) = value;
1963 }
1965  _upb_sethas(msg, 14);
1966  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 80)) = value;
1967 }
1969  _upb_sethas(msg, 15);
1970  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 96)) = value;
1971 }
1973  _upb_sethas(msg, 16);
1974  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 112)) = value;
1975 }
1977  _upb_sethas(msg, 17);
1978  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 128)) = value;
1979 }
1981  _upb_sethas(msg, 18);
1982  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 144)) = value;
1983 }
1985  _upb_sethas(msg, 10);
1986  UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value;
1987 }
1990 }
1993 }
1997  msg, UPB_SIZE(92, 160), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
1998  if (!ok) return NULL;
1999  return sub;
2000 }
2001 
2002 
2003 /* google.protobuf.MessageOptions */
2004 
2007 }
2009  upb_arena *arena) {
2011  return (ret && upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit)) ? ret : NULL;
2012 }
2015 }
2016 
2026 
2028  _upb_sethas(msg, 1);
2029  UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
2030 }
2032  _upb_sethas(msg, 2);
2033  UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value;
2034 }
2036  _upb_sethas(msg, 3);
2037  UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value;
2038 }
2040  _upb_sethas(msg, 4);
2041  UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value;
2042 }
2045 }
2048 }
2052  msg, UPB_SIZE(8, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2053  if (!ok) return NULL;
2054  return sub;
2055 }
2056 
2057 
2058 /* google.protobuf.FieldOptions */
2059 
2062 }
2064  upb_arena *arena) {
2066  return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit)) ? ret : NULL;
2067 }
2069  return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
2070 }
2071 
2085 
2087  _upb_sethas(msg, 1);
2088  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
2089 }
2091  _upb_sethas(msg, 3);
2092  UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value;
2093 }
2095  _upb_sethas(msg, 4);
2096  UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)) = value;
2097 }
2099  _upb_sethas(msg, 5);
2100  UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value;
2101 }
2103  _upb_sethas(msg, 2);
2104  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value;
2105 }
2107  _upb_sethas(msg, 6);
2108  UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)) = value;
2109 }
2112 }
2115 }
2119  msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2120  if (!ok) return NULL;
2121  return sub;
2122 }
2123 
2124 
2125 /* google.protobuf.OneofOptions */
2126 
2129 }
2131  upb_arena *arena) {
2133  return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit)) ? ret : NULL;
2134 }
2136  return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
2137 }
2138 
2140 
2143 }
2146 }
2150  msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2151  if (!ok) return NULL;
2152  return sub;
2153 }
2154 
2155 
2156 /* google.protobuf.EnumOptions */
2157 
2160 }
2162  upb_arena *arena) {
2164  return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit)) ? ret : NULL;
2165 }
2167  return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
2168 }
2169 
2175 
2177  _upb_sethas(msg, 1);
2178  UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
2179 }
2181  _upb_sethas(msg, 2);
2182  UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value;
2183 }
2186 }
2189 }
2193  msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2194  if (!ok) return NULL;
2195  return sub;
2196 }
2197 
2198 
2199 /* google.protobuf.EnumValueOptions */
2200 
2203 }
2205  upb_arena *arena) {
2207  return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit)) ? ret : NULL;
2208 }
2211 }
2212 
2216 
2218  _upb_sethas(msg, 1);
2219  UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
2220 }
2223 }
2226 }
2230  msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2231  if (!ok) return NULL;
2232  return sub;
2233 }
2234 
2235 
2236 /* google.protobuf.ServiceOptions */
2237 
2240 }
2242  upb_arena *arena) {
2244  return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit)) ? ret : NULL;
2245 }
2248 }
2249 
2253 
2255  _upb_sethas(msg, 1);
2256  UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
2257 }
2260 }
2263 }
2267  msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2268  if (!ok) return NULL;
2269  return sub;
2270 }
2271 
2272 
2273 /* google.protobuf.MethodOptions */
2274 
2277 }
2279  upb_arena *arena) {
2281  return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit)) ? ret : NULL;
2282 }
2285 }
2286 
2292 
2294  _upb_sethas(msg, 2);
2295  UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value;
2296 }
2298  _upb_sethas(msg, 1);
2299  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
2300 }
2303 }
2306 }
2310  msg, UPB_SIZE(20, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2311  if (!ok) return NULL;
2312  return sub;
2313 }
2314 
2315 
2316 /* google.protobuf.UninterpretedOption */
2317 
2320 }
2322  upb_arena *arena) {
2324  return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit)) ? ret : NULL;
2325 }
2328 }
2329 
2343 
2346 }
2349 }
2353  msg, UPB_SIZE(56, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2354  if (!ok) return NULL;
2355  return sub;
2356 }
2358  _upb_sethas(msg, 4);
2359  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value;
2360 }
2362  _upb_sethas(msg, 1);
2363  UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value;
2364 }
2366  _upb_sethas(msg, 2);
2367  UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value;
2368 }
2370  _upb_sethas(msg, 3);
2371  UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value;
2372 }
2374  _upb_sethas(msg, 5);
2375  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value;
2376 }
2378  _upb_sethas(msg, 6);
2379  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value;
2380 }
2381 
2382 
2383 /* google.protobuf.UninterpretedOption.NamePart */
2384 
2387 }
2389  upb_arena *arena) {
2392 }
2395 }
2396 
2401 
2403  _upb_sethas(msg, 2);
2404  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
2405 }
2407  _upb_sethas(msg, 1);
2408  UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value;
2409 }
2410 
2411 
2412 /* google.protobuf.SourceCodeInfo */
2413 
2416 }
2418  upb_arena *arena) {
2420  return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit)) ? ret : NULL;
2421 }
2424 }
2425 
2427 
2430 }
2433 }
2437  msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2438  if (!ok) return NULL;
2439  return sub;
2440 }
2441 
2442 
2443 /* google.protobuf.SourceCodeInfo.Location */
2444 
2447 }
2449  upb_arena *arena) {
2451  return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit)) ? ret : NULL;
2452 }
2455 }
2456 
2464 
2466  return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
2467 }
2469  return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
2470 }
2473  msg, UPB_SIZE(20, 40), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
2474 }
2476  return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
2477 }
2479  return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
2480 }
2483  msg, UPB_SIZE(24, 48), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
2484 }
2486  _upb_sethas(msg, 1);
2487  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value;
2488 }
2490  _upb_sethas(msg, 2);
2491  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value;
2492 }
2494  return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
2495 }
2497  return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena);
2498 }
2501  msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena);
2502 }
2503 
2504 
2505 /* google.protobuf.GeneratedCodeInfo */
2506 
2509 }
2511  upb_arena *arena) {
2513  return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit)) ? ret : NULL;
2514 }
2517 }
2518 
2520 
2523 }
2526 }
2530  msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
2531  if (!ok) return NULL;
2532  return sub;
2533 }
2534 
2535 
2536 /* google.protobuf.GeneratedCodeInfo.Annotation */
2537 
2540 }
2542  upb_arena *arena) {
2545 }
2548 }
2549 
2557 
2559  return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len);
2560 }
2562  return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena);
2563 }
2566  msg, UPB_SIZE(20, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena);
2567 }
2569  _upb_sethas(msg, 3);
2570  UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value;
2571 }
2573  _upb_sethas(msg, 1);
2574  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value;
2575 }
2577  _upb_sethas(msg, 2);
2578  UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value;
2579 }
2580 
2581 
2582 #ifdef __cplusplus
2583 } /* extern "C" */
2584 #endif
2585 
2586 
2587 #endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ */
2588 /*
2589 ** Defs are upb's internal representation of the constructs that can appear
2590 ** in a .proto file:
2591 **
2592 ** - upb::MessageDefPtr (upb_msgdef): describes a "message" construct.
2593 ** - upb::FieldDefPtr (upb_fielddef): describes a message field.
2594 ** - upb::FileDefPtr (upb_filedef): describes a .proto file and its defs.
2595 ** - upb::EnumDefPtr (upb_enumdef): describes an enum.
2596 ** - upb::OneofDefPtr (upb_oneofdef): describes a oneof.
2597 **
2598 ** TODO: definitions of services.
2599 **
2600 ** This is a mixed C/C++ interface that offers a full API to both languages.
2601 ** See the top-level README for more information.
2602 */
2603 
2604 #ifndef UPB_DEF_H_
2605 #define UPB_DEF_H_
2606 
2607 /*
2608 ** upb_table
2609 **
2610 ** This header is INTERNAL-ONLY! Its interfaces are not public or stable!
2611 ** This file defines very fast int->upb_value (inttable) and string->upb_value
2612 ** (strtable) hash tables.
2613 **
2614 ** The table uses chained scatter with Brent's variation (inspired by the Lua
2615 ** implementation of hash tables). The hash function for strings is Austin
2616 ** Appleby's "MurmurHash."
2617 **
2618 ** The inttable uses uintptr_t as its key, which guarantees it can be used to
2619 ** store pointers or integers of at least 32 bits (upb isn't really useful on
2620 ** systems where sizeof(void*) < 4).
2621 **
2622 ** The table must be homogenous (all values of the same type). In debug
2623 ** mode, we check this on insert and lookup.
2624 */
2625 
2626 #ifndef UPB_TABLE_H_
2627 #define UPB_TABLE_H_
2628 
2629 #include <stdint.h>
2630 #include <string.h>
2631 
2632 #ifdef __cplusplus
2633 extern "C" {
2634 #endif
2635 
2636 
2637 /* upb_value ******************************************************************/
2638 
2639 /* A tagged union (stored untagged inside the table) so that we can check that
2640  * clients calling table accessors are correctly typed without having to have
2641  * an explosion of accessors. */
2642 typedef enum {
2654 } upb_ctype_t;
2655 
2656 typedef struct {
2657  uint64_t val;
2658 #ifndef NDEBUG
2659  /* In debug mode we carry the value type around also so we can check accesses
2660  * to be sure the right member is being read. */
2661  upb_ctype_t ctype;
2662 #endif
2663 } upb_value;
2664 
2665 #ifdef NDEBUG
2666 #define SET_TYPE(dest, val) UPB_UNUSED(val)
2667 #else
2668 #define SET_TYPE(dest, val) dest = val
2669 #endif
2670 
2671 /* Like strdup(), which isn't always available since it's not ANSI C. */
2672 char *upb_strdup(const char *s, upb_alloc *a);
2673 /* Variant that works with a length-delimited rather than NULL-delimited string,
2674  * as supported by strtable. */
2675 char *upb_strdup2(const char *s, size_t len, upb_alloc *a);
2676 
2677 UPB_INLINE char *upb_gstrdup(const char *s) {
2678  return upb_strdup(s, &upb_alloc_global);
2679 }
2680 
2682  upb_ctype_t ctype) {
2683  v->val = val;
2684  SET_TYPE(v->ctype, ctype);
2685 }
2686 
2688  upb_value ret;
2689  _upb_value_setval(&ret, val, ctype);
2690  return ret;
2691 }
2692 
2693 /* For each value ctype, define the following set of functions:
2694  *
2695  * // Get/set an int32 from a upb_value.
2696  * int32_t upb_value_getint32(upb_value val);
2697  * void upb_value_setint32(upb_value *val, int32_t cval);
2698  *
2699  * // Construct a new upb_value from an int32.
2700  * upb_value upb_value_int32(int32_t val); */
2701 #define FUNCS(name, membername, type_t, converter, proto_type) \
2702  UPB_INLINE void upb_value_set ## name(upb_value *val, type_t cval) { \
2703  val->val = (converter)cval; \
2704  SET_TYPE(val->ctype, proto_type); \
2705  } \
2706  UPB_INLINE upb_value upb_value_ ## name(type_t val) { \
2707  upb_value ret; \
2708  upb_value_set ## name(&ret, val); \
2709  return ret; \
2710  } \
2711  UPB_INLINE type_t upb_value_get ## name(upb_value val) { \
2712  UPB_ASSERT_DEBUGVAR(val.ctype == proto_type); \
2713  return (type_t)(converter)val.val; \
2714  }
2715 
2716 FUNCS(int32, int32, int32_t, int32_t, UPB_CTYPE_INT32)
2717 FUNCS(int64, int64, int64_t, int64_t, UPB_CTYPE_INT64)
2718 FUNCS(uint32, uint32, uint32_t, uint32_t, UPB_CTYPE_UINT32)
2719 FUNCS(uint64, uint64, uint64_t, uint64_t, UPB_CTYPE_UINT64)
2720 FUNCS(bool, _bool, bool, bool, UPB_CTYPE_BOOL)
2721 FUNCS(cstr, cstr, char*, uintptr_t, UPB_CTYPE_CSTR)
2722 FUNCS(ptr, ptr, void*, uintptr_t, UPB_CTYPE_PTR)
2723 FUNCS(constptr, constptr, const void*, uintptr_t, UPB_CTYPE_CONSTPTR)
2724 FUNCS(fptr, fptr, upb_func*, uintptr_t, UPB_CTYPE_FPTR)
2725 
2726 #undef FUNCS
2727 
2729  memcpy(&val->val, &cval, sizeof(cval));
2730  SET_TYPE(val->ctype, UPB_CTYPE_FLOAT);
2731 }
2732 
2734  memcpy(&val->val, &cval, sizeof(cval));
2735  SET_TYPE(val->ctype, UPB_CTYPE_DOUBLE);
2736 }
2737 
2739  upb_value ret;
2740  upb_value_setfloat(&ret, cval);
2741  return ret;
2742 }
2743 
2745  upb_value ret;
2746  upb_value_setdouble(&ret, cval);
2747  return ret;
2748 }
2749 
2750 #undef SET_TYPE
2751 
2752 
2753 /* upb_tabkey *****************************************************************/
2754 
2755 /* Either:
2756  * 1. an actual integer key, or
2757  * 2. a pointer to a string prefixed by its uint32_t length, owned by us.
2758  *
2759  * ...depending on whether this is a string table or an int table. We would
2760  * make this a union of those two types, but C89 doesn't support statically
2761  * initializing a non-first union member. */
2762 typedef uintptr_t upb_tabkey;
2763 
2765  char* mem = (char*)key;
2766  if (len) memcpy(len, mem, sizeof(*len));
2767  return mem + sizeof(*len);
2768 }
2769 
2770 
2771 /* upb_tabval *****************************************************************/
2772 
2773 typedef struct {
2774  uint64_t val;
2775 } upb_tabval;
2776 
2777 #define UPB_TABVALUE_EMPTY_INIT {-1}
2778 
2779 
2780 /* upb_table ******************************************************************/
2781 
2782 typedef struct _upb_tabent {
2785 
2786  /* Internal chaining. This is const so we can create static initializers for
2787  * tables. We cast away const sometimes, but *only* when the containing
2788  * upb_table is known to be non-const. This requires a bit of care, but
2789  * the subtlety is confined to table.c. */
2790  const struct _upb_tabent *next;
2791 } upb_tabent;
2792 
2793 typedef struct {
2794  size_t count; /* Number of entries in the hash part. */
2795  size_t mask; /* Mask to turn hash value -> bucket. */
2796  upb_ctype_t ctype; /* Type of all values. */
2797  uint8_t size_lg2; /* Size of the hashtable part is 2^size_lg2 entries. */
2798 
2799  /* Hash table entries.
2800  * Making this const isn't entirely accurate; what we really want is for it to
2801  * have the same const-ness as the table it's inside. But there's no way to
2802  * declare that in C. So we have to make it const so that we can statically
2803  * initialize const hash tables. Then we cast away const when we have to.
2804  */
2806 
2807 #ifndef NDEBUG
2808  /* This table's allocator. We make the user pass it in to every relevant
2809  * function and only use this to check it in debug mode. We do this solely
2810  * to keep upb_table as small as possible. This might seem slightly paranoid
2811  * but the plan is to use upb_table for all map fields and extension sets in
2812  * a forthcoming message representation, so there could be a lot of these.
2813  * If this turns out to be too annoying later, we can change it (since this
2814  * is an internal-only header file). */
2815  upb_alloc *alloc;
2816 #endif
2817 } upb_table;
2818 
2819 typedef struct {
2821 } upb_strtable;
2822 
2823 typedef struct {
2824  upb_table t; /* For entries that don't fit in the array part. */
2825  const upb_tabval *array; /* Array part of the table. See const note above. */
2826  size_t array_size; /* Array part size. */
2827  size_t array_count; /* Array part number of elements. */
2828 } upb_inttable;
2829 
2830 #define UPB_INTTABLE_INIT(count, mask, ctype, size_lg2, ent, a, asize, acount) \
2831  {UPB_TABLE_INIT(count, mask, ctype, size_lg2, ent), a, asize, acount}
2832 
2833 #define UPB_EMPTY_INTTABLE_INIT(ctype) \
2834  UPB_INTTABLE_INIT(0, 0, ctype, 0, NULL, NULL, 0, 0)
2835 
2836 #define UPB_ARRAY_EMPTYENT -1
2837 
2839  if (t->size_lg2 == 0)
2840  return 0;
2841  else
2842  return 1 << t->size_lg2;
2843 }
2844 
2845 /* Internal-only functions, in .h file only out of necessity. */
2847  return e->key == 0;
2848 }
2849 
2850 /* Used by some of the unit tests for generic hashing functionality. */
2851 uint32_t MurmurHash2(const void * key, size_t len, uint32_t seed);
2852 
2853 UPB_INLINE uintptr_t upb_intkey(uintptr_t key) {
2854  return key;
2855 }
2856 
2857 UPB_INLINE uint32_t upb_inthash(uintptr_t key) {
2858  return (uint32_t)key;
2859 }
2860 
2861 static const upb_tabent *upb_getentry(const upb_table *t, uint32_t hash) {
2862  return t->entries + (hash & t->mask);
2863 }
2864 
2866  return key.val != (uint64_t)-1;
2867 }
2868 
2869 /* Initialize and uninitialize a table, respectively. If memory allocation
2870  * failed, false is returned that the table is uninitialized. */
2875 
2877  return upb_inttable_init2(table, ctype, &upb_alloc_global);
2878 }
2879 
2881  return upb_strtable_init2(table, ctype, &upb_alloc_global);
2882 }
2883 
2886 }
2887 
2890 }
2891 
2892 /* Returns the number of values in the table. */
2893 size_t upb_inttable_count(const upb_inttable *t);
2895  return t->t.count;
2896 }
2897 
2898 void upb_inttable_packedsize(const upb_inttable *t, size_t *size);
2899 void upb_strtable_packedsize(const upb_strtable *t, size_t *size);
2900 upb_inttable *upb_inttable_pack(const upb_inttable *t, void *p, size_t *ofs,
2901  size_t size);
2902 upb_strtable *upb_strtable_pack(const upb_strtable *t, void *p, size_t *ofs,
2903  size_t size);
2904 
2905 /* Inserts the given key into the hashtable with the given value. The key must
2906  * not already exist in the hash table. For string tables, the key must be
2907  * NULL-terminated, and the table will make an internal copy of the key.
2908  * Inttables must not insert a value of UINTPTR_MAX.
2909  *
2910  * If a table resize was required but memory allocation failed, false is
2911  * returned and the table is unchanged. */
2912 bool upb_inttable_insert2(upb_inttable *t, uintptr_t key, upb_value val,
2913  upb_alloc *a);
2914 bool upb_strtable_insert3(upb_strtable *t, const char *key, size_t len,
2915  upb_value val, upb_alloc *a);
2916 
2918  upb_value val) {
2920 }
2921 
2923  size_t len, upb_value val) {
2925 }
2926 
2927 /* For NULL-terminated strings. */
2929  upb_value val) {
2930  return upb_strtable_insert2(t, key, strlen(key), val);
2931 }
2932 
2933 /* Looks up key in this table, returning "true" if the key was found.
2934  * If v is non-NULL, copies the value for this key into *v. */
2935 bool upb_inttable_lookup(const upb_inttable *t, uintptr_t key, upb_value *v);
2936 bool upb_strtable_lookup2(const upb_strtable *t, const char *key, size_t len,
2937  upb_value *v);
2938 
2939 /* For NULL-terminated strings. */
2940 UPB_INLINE bool upb_strtable_lookup(const upb_strtable *t, const char *key,
2941  upb_value *v) {
2942  return upb_strtable_lookup2(t, key, strlen(key), v);
2943 }
2944 
2945 /* Removes an item from the table. Returns true if the remove was successful,
2946  * and stores the removed item in *val if non-NULL. */
2947 bool upb_inttable_remove(upb_inttable *t, uintptr_t key, upb_value *val);
2948 bool upb_strtable_remove3(upb_strtable *t, const char *key, size_t len,
2949  upb_value *val, upb_alloc *alloc);
2950 
2952  size_t len, upb_value *val) {
2954 }
2955 
2956 /* For NULL-terminated strings. */
2958  upb_value *v) {
2959  return upb_strtable_remove2(t, key, strlen(key), v);
2960 }
2961 
2962 /* Updates an existing entry in an inttable. If the entry does not exist,
2963  * returns false and does nothing. Unlike insert/remove, this does not
2964  * invalidate iterators. */
2965 bool upb_inttable_replace(upb_inttable *t, uintptr_t key, upb_value val);
2966 
2967 /* Handy routines for treating an inttable like a stack. May not be mixed with
2968  * other insert/remove calls. */
2971 
2974 }
2975 
2976 /* Convenience routines for inttables with pointer keys. */
2977 bool upb_inttable_insertptr2(upb_inttable *t, const void *key, upb_value val,
2978  upb_alloc *a);
2979 bool upb_inttable_removeptr(upb_inttable *t, const void *key, upb_value *val);
2981  const upb_inttable *t, const void *key, upb_value *val);
2982 
2984  upb_value val) {
2986 }
2987 
2988 /* Optimizes the table for the current set of entries, for both memory use and
2989  * lookup time. Client should call this after all entries have been inserted;
2990  * inserting more entries is legal, but will likely require a table resize. */
2992 
2995 }
2996 
2997 /* A special-case inlinable version of the lookup routine for 32-bit
2998  * integers. */
3000  upb_value *v) {
3001  *v = upb_value_int32(0); /* Silence compiler warnings. */
3002  if (key < t->array_size) {
3003  upb_tabval arrval = t->array[key];
3004  if (upb_arrhas(arrval)) {
3005  _upb_value_setval(v, arrval.val, t->t.ctype);
3006  return true;
3007  } else {
3008  return false;
3009  }
3010  } else {
3011  const upb_tabent *e;
3012  if (t->t.entries == NULL) return false;
3013  for (e = upb_getentry(&t->t, upb_inthash(key)); true; e = e->next) {
3014  if ((uint32_t)e->key == key) {
3015  _upb_value_setval(v, e->val.val, t->t.ctype);
3016  return true;
3017  }
3018  if (e->next == NULL) return false;
3019  }
3020  }
3021 }
3022 
3023 /* Exposed for testing only. */
3024 bool upb_strtable_resize(upb_strtable *t, size_t size_lg2, upb_alloc *a);
3025 
3026 /* Iterators ******************************************************************/
3027 
3028 /* Iterators for int and string tables. We are subject to some kind of unusual
3029  * design constraints:
3030  *
3031  * For high-level languages:
3032  * - we must be able to guarantee that we don't crash or corrupt memory even if
3033  * the program accesses an invalidated iterator.
3034  *
3035  * For C++11 range-based for:
3036  * - iterators must be copyable
3037  * - iterators must be comparable
3038  * - it must be possible to construct an "end" value.
3039  *
3040  * Iteration order is undefined.
3041  *
3042  * Modifying the table invalidates iterators. upb_{str,int}table_done() is
3043  * guaranteed to work even on an invalidated iterator, as long as the table it
3044  * is iterating over has not been freed. Calling next() or accessing data from
3045  * an invalidated iterator yields unspecified elements from the table, but it is
3046  * guaranteed not to crash and to return real table elements (except when done()
3047  * is true). */
3048 
3049 
3050 /* upb_strtable_iter **********************************************************/
3051 
3052 /* upb_strtable_iter i;
3053  * upb_strtable_begin(&i, t);
3054  * for(; !upb_strtable_done(&i); upb_strtable_next(&i)) {
3055  * const char *key = upb_strtable_iter_key(&i);
3056  * const upb_value val = upb_strtable_iter_value(&i);
3057  * // ...
3058  * }
3059  */
3060 
3061 typedef struct {
3062  const upb_strtable *t;
3063  size_t index;
3065 
3069 const char *upb_strtable_iter_key(const upb_strtable_iter *i);
3074  const upb_strtable_iter *i2);
3075 
3076 
3077 /* upb_inttable_iter **********************************************************/
3078 
3079 /* upb_inttable_iter i;
3080  * upb_inttable_begin(&i, t);
3081  * for(; !upb_inttable_done(&i); upb_inttable_next(&i)) {
3082  * uintptr_t key = upb_inttable_iter_key(&i);
3083  * upb_value val = upb_inttable_iter_value(&i);
3084  * // ...
3085  * }
3086  */
3087 
3088 typedef struct {
3089  const upb_inttable *t;
3090  size_t index;
3093 
3097 uintptr_t upb_inttable_iter_key(const upb_inttable_iter *i);
3101  const upb_inttable_iter *i2);
3102 
3103 
3104 #ifdef __cplusplus
3105 } /* extern "C" */
3106 #endif
3107 
3108 #endif /* UPB_TABLE_H_ */
3109 
3110 #ifdef __cplusplus
3111 #include <cstring>
3112 #include <memory>
3113 #include <string>
3114 #include <vector>
3115 
3116 namespace upb {
3117 class EnumDefPtr;
3118 class FieldDefPtr;
3119 class FileDefPtr;
3120 class MessageDefPtr;
3121 class OneofDefPtr;
3122 class SymbolTable;
3123 }
3124 #endif
3125 
3126 struct upb_enumdef;
3127 typedef struct upb_enumdef upb_enumdef;
3128 struct upb_fielddef;
3130 struct upb_filedef;
3131 typedef struct upb_filedef upb_filedef;
3132 struct upb_msgdef;
3133 typedef struct upb_msgdef upb_msgdef;
3134 struct upb_oneofdef;
3136 struct upb_symtab;
3137 typedef struct upb_symtab upb_symtab;
3138 
3139 typedef enum {
3142 } upb_syntax_t;
3143 
3144 /* All the different kind of well known type messages. For simplicity of check,
3145  * number wrappers and string wrappers are grouped together. Make sure the
3146  * order and merber of these groups are not changed.
3147  */
3148 typedef enum {
3154  /* number wrappers */
3161  /* string wrappers */
3169 
3170 /* upb_fielddef ***************************************************************/
3171 
3172 /* Maximum field number allowed for FieldDefs. This is an inherent limit of the
3173  * protobuf wire format. */
3174 #define UPB_MAX_FIELDNUMBER ((1 << 29) - 1)
3175 
3176 #ifdef __cplusplus
3177 extern "C" {
3178 #endif
3179 
3180 const char *upb_fielddef_fullname(const upb_fielddef *f);
3184 uint32_t upb_fielddef_number(const upb_fielddef *f);
3185 const char *upb_fielddef_name(const upb_fielddef *f);
3187 bool upb_fielddef_lazy(const upb_fielddef *f);
3188 bool upb_fielddef_packed(const upb_fielddef *f);
3189 size_t upb_fielddef_getjsonname(const upb_fielddef *f, char *buf, size_t len);
3192 uint32_t upb_fielddef_index(const upb_fielddef *f);
3193 bool upb_fielddef_issubmsg(const upb_fielddef *f);
3194 bool upb_fielddef_isstring(const upb_fielddef *f);
3195 bool upb_fielddef_isseq(const upb_fielddef *f);
3197 bool upb_fielddef_ismap(const upb_fielddef *f);
3198 int64_t upb_fielddef_defaultint64(const upb_fielddef *f);
3199 int32_t upb_fielddef_defaultint32(const upb_fielddef *f);
3200 uint64_t upb_fielddef_defaultuint64(const upb_fielddef *f);
3201 uint32_t upb_fielddef_defaultuint32(const upb_fielddef *f);
3205 const char *upb_fielddef_defaultstr(const upb_fielddef *f, size_t *len);
3210 
3211 /* Internal only. */
3212 uint32_t upb_fielddef_selectorbase(const upb_fielddef *f);
3213 
3214 #ifdef __cplusplus
3215 } /* extern "C" */
3216 
3217 /* A upb_fielddef describes a single field in a message. It is most often
3218  * found as a part of a upb_msgdef, but can also stand alone to represent
3219  * an extension. */
3220 class upb::FieldDefPtr {
3221  public:
3222  FieldDefPtr() : ptr_(nullptr) {}
3223  explicit FieldDefPtr(const upb_fielddef *ptr) : ptr_(ptr) {}
3224 
3225  const upb_fielddef* ptr() const { return ptr_; }
3226  explicit operator bool() const { return ptr_ != nullptr; }
3227 
3228  typedef upb_fieldtype_t Type;
3229  typedef upb_label_t Label;
3230  typedef upb_descriptortype_t DescriptorType;
3231 
3232  const char* full_name() const { return upb_fielddef_fullname(ptr_); }
3233 
3234  Type type() const { return upb_fielddef_type(ptr_); }
3235  Label label() const { return upb_fielddef_label(ptr_); }
3236  const char* name() const { return upb_fielddef_name(ptr_); }
3237  uint32_t number() const { return upb_fielddef_number(ptr_); }
3238  bool is_extension() const { return upb_fielddef_isextension(ptr_); }
3239 
3240  /* Copies the JSON name for this field into the given buffer. Returns the
3241  * actual size of the JSON name, including the NULL terminator. If the
3242  * return value is 0, the JSON name is unset. If the return value is
3243  * greater than len, the JSON name was truncated. The buffer is always
3244  * NULL-terminated if len > 0.
3245  *
3246  * The JSON name always defaults to a camelCased version of the regular
3247  * name. However if the regular name is unset, the JSON name will be unset
3248  * also.
3249  */
3250  size_t GetJsonName(char *buf, size_t len) const {
3251  return upb_fielddef_getjsonname(ptr_, buf, len);
3252  }
3253 
3254  /* Convenience version of the above function which copies the JSON name
3255  * into the given string, returning false if the name is not set. */
3256  template <class T>
3257  bool GetJsonName(T* str) {
3258  str->resize(GetJsonName(NULL, 0));
3259  GetJsonName(&(*str)[0], str->size());
3260  return str->size() > 0;
3261  }
3262 
3263  /* For UPB_TYPE_MESSAGE fields only where is_tag_delimited() == false,
3264  * indicates whether this field should have lazy parsing handlers that yield
3265  * the unparsed string for the submessage.
3266  *
3267  * TODO(haberman): I think we want to move this into a FieldOptions container
3268  * when we add support for custom options (the FieldOptions struct will
3269  * contain both regular FieldOptions like "lazy" *and* custom options). */
3270  bool lazy() const { return upb_fielddef_lazy(ptr_); }
3271 
3272  /* For non-string, non-submessage fields, this indicates whether binary
3273  * protobufs are encoded in packed or non-packed format.
3274  *
3275  * TODO(haberman): see note above about putting options like this into a
3276  * FieldOptions container. */
3277  bool packed() const { return upb_fielddef_packed(ptr_); }
3278 
3279  /* An integer that can be used as an index into an array of fields for
3280  * whatever message this field belongs to. Guaranteed to be less than
3281  * f->containing_type()->field_count(). May only be accessed once the def has
3282  * been finalized. */
3283  uint32_t index() const { return upb_fielddef_index(ptr_); }
3284 
3285  /* The MessageDef to which this field belongs.
3286  *
3287  * If this field has been added to a MessageDef, that message can be retrieved
3288  * directly (this is always the case for frozen FieldDefs).
3289  *
3290  * If the field has not yet been added to a MessageDef, you can set the name
3291  * of the containing type symbolically instead. This is mostly useful for
3292  * extensions, where the extension is declared separately from the message. */
3293  MessageDefPtr containing_type() const;
3294 
3295  /* The OneofDef to which this field belongs, or NULL if this field is not part
3296  * of a oneof. */
3297  OneofDefPtr containing_oneof() const;
3298 
3299  /* The field's type according to the enum in descriptor.proto. This is not
3300  * the same as UPB_TYPE_*, because it distinguishes between (for example)
3301  * INT32 and SINT32, whereas our "type" enum does not. This return of
3302  * descriptor_type() is a function of type(), integer_format(), and
3303  * is_tag_delimited(). */
3304  DescriptorType descriptor_type() const {
3305  return upb_fielddef_descriptortype(ptr_);
3306  }
3307 
3308  /* Convenient field type tests. */
3309  bool IsSubMessage() const { return upb_fielddef_issubmsg(ptr_); }
3310  bool IsString() const { return upb_fielddef_isstring(ptr_); }
3311  bool IsSequence() const { return upb_fielddef_isseq(ptr_); }
3312  bool IsPrimitive() const { return upb_fielddef_isprimitive(ptr_); }
3313  bool IsMap() const { return upb_fielddef_ismap(ptr_); }
3314 
3315  /* Returns the non-string default value for this fielddef, which may either
3316  * be something the client set explicitly or the "default default" (0 for
3317  * numbers, empty for strings). The field's type indicates the type of the
3318  * returned value, except for enum fields that are still mutable.
3319  *
3320  * Requires that the given function matches the field's current type. */
3321  int64_t default_int64() const { return upb_fielddef_defaultint64(ptr_); }
3322  int32_t default_int32() const { return upb_fielddef_defaultint32(ptr_); }
3323  uint64_t default_uint64() const { return upb_fielddef_defaultuint64(ptr_); }
3324  uint32_t default_uint32() const { return upb_fielddef_defaultuint32(ptr_); }
3325  bool default_bool() const { return upb_fielddef_defaultbool(ptr_); }
3326  float default_float() const { return upb_fielddef_defaultfloat(ptr_); }
3327  double default_double() const { return upb_fielddef_defaultdouble(ptr_); }
3328 
3329  /* The resulting string is always NULL-terminated. If non-NULL, the length
3330  * will be stored in *len. */
3331  const char *default_string(size_t * len) const {
3332  return upb_fielddef_defaultstr(ptr_, len);
3333  }
3334 
3335  /* Returns the enum or submessage def for this field, if any. The field's
3336  * type must match (ie. you may only call enum_subdef() for fields where
3337  * type() == UPB_TYPE_ENUM). */
3338  EnumDefPtr enum_subdef() const;
3339  MessageDefPtr message_subdef() const;
3340 
3341  private:
3342  const upb_fielddef *ptr_;
3343 };
3344 
3345 #endif /* __cplusplus */
3346 
3347 /* upb_oneofdef ***************************************************************/
3348 
3349 #ifdef __cplusplus
3350 extern "C" {
3351 #endif
3352 
3354 
3355 const char *upb_oneofdef_name(const upb_oneofdef *o);
3357 int upb_oneofdef_numfields(const upb_oneofdef *o);
3358 uint32_t upb_oneofdef_index(const upb_oneofdef *o);
3359 
3360 /* Oneof lookups:
3361  * - ntof: look up a field by name.
3362  * - ntofz: look up a field by name (as a null-terminated string).
3363  * - itof: look up a field by number. */
3365  const char *name, size_t length);
3367  const char *name) {
3368  return upb_oneofdef_ntof(o, name, strlen(name));
3369 }
3370 const upb_fielddef *upb_oneofdef_itof(const upb_oneofdef *o, uint32_t num);
3371 
3372 /* upb_oneof_iter i;
3373  * for(upb_oneof_begin(&i, e); !upb_oneof_done(&i); upb_oneof_next(&i)) {
3374  * // ...
3375  * }
3376  */
3377 void upb_oneof_begin(upb_oneof_iter *iter, const upb_oneofdef *o);
3378 void upb_oneof_next(upb_oneof_iter *iter);
3379 bool upb_oneof_done(upb_oneof_iter *iter);
3382 bool upb_oneof_iter_isequal(const upb_oneof_iter *iter1,
3383  const upb_oneof_iter *iter2);
3384 
3385 #ifdef __cplusplus
3386 } /* extern "C" */
3387 
3388 /* Class that represents a oneof. */
3389 class upb::OneofDefPtr {
3390  public:
3391  OneofDefPtr() : ptr_(nullptr) {}
3392  explicit OneofDefPtr(const upb_oneofdef *ptr) : ptr_(ptr) {}
3393 
3394  const upb_oneofdef* ptr() const { return ptr_; }
3395  explicit operator bool() { return ptr_ != nullptr; }
3396 
3397  /* Returns the MessageDef that owns this OneofDef. */
3398  MessageDefPtr containing_type() const;
3399 
3400  /* Returns the name of this oneof. This is the name used to look up the oneof
3401  * by name once added to a message def. */
3402  const char* name() const { return upb_oneofdef_name(ptr_); }
3403 
3404  /* Returns the number of fields currently defined in the oneof. */
3405  int field_count() const { return upb_oneofdef_numfields(ptr_); }
3406 
3407  /* Looks up by name. */
3408  FieldDefPtr FindFieldByName(const char *name, size_t len) const {
3409  return FieldDefPtr(upb_oneofdef_ntof(ptr_, name, len));
3410  }
3411  FieldDefPtr FindFieldByName(const char* name) const {
3412  return FieldDefPtr(upb_oneofdef_ntofz(ptr_, name));
3413  }
3414 
3415  template <class T>
3416  FieldDefPtr FindFieldByName(const T& str) const {
3417  return FindFieldByName(str.c_str(), str.size());
3418  }
3419 
3420  /* Looks up by tag number. */
3421  FieldDefPtr FindFieldByNumber(uint32_t num) const {
3422  return FieldDefPtr(upb_oneofdef_itof(ptr_, num));
3423  }
3424 
3425  class const_iterator
3426  : public std::iterator<std::forward_iterator_tag, FieldDefPtr> {
3427  public:
3428  void operator++() { upb_oneof_next(&iter_); }
3429 
3430  FieldDefPtr operator*() const {
3431  return FieldDefPtr(upb_oneof_iter_field(&iter_));
3432  }
3433 
3434  bool operator!=(const const_iterator& other) const {
3435  return !upb_oneof_iter_isequal(&iter_, &other.iter_);
3436  }
3437 
3438  bool operator==(const const_iterator& other) const {
3439  return upb_oneof_iter_isequal(&iter_, &other.iter_);
3440  }
3441 
3442  private:
3443  friend class OneofDefPtr;
3444 
3445  const_iterator() {}
3446  explicit const_iterator(OneofDefPtr o) {
3447  upb_oneof_begin(&iter_, o.ptr());
3448  }
3449  static const_iterator end() {
3450  const_iterator iter;
3451  upb_oneof_iter_setdone(&iter.iter_);
3452  return iter;
3453  }
3454 
3455  upb_oneof_iter iter_;
3456  };
3457 
3458  const_iterator begin() const { return const_iterator(*this); }
3459  const_iterator end() const { return const_iterator::end(); }
3460 
3461  private:
3462  const upb_oneofdef *ptr_;
3463 };
3464 
3465 inline upb::OneofDefPtr upb::FieldDefPtr::containing_oneof() const {
3466  return OneofDefPtr(upb_fielddef_containingoneof(ptr_));
3467 }
3468 
3469 #endif /* __cplusplus */
3470 
3471 /* upb_msgdef *****************************************************************/
3472 
3475 
3476 /* Well-known field tag numbers for map-entry messages. */
3477 #define UPB_MAPENTRY_KEY 1
3478 #define UPB_MAPENTRY_VALUE 2
3479 
3480 /* Well-known field tag numbers for Any messages. */
3481 #define UPB_ANY_TYPE 1
3482 #define UPB_ANY_VALUE 2
3483 
3484 /* Well-known field tag numbers for timestamp messages. */
3485 #define UPB_DURATION_SECONDS 1
3486 #define UPB_DURATION_NANOS 2
3487 
3488 /* Well-known field tag numbers for duration messages. */
3489 #define UPB_TIMESTAMP_SECONDS 1
3490 #define UPB_TIMESTAMP_NANOS 2
3491 
3492 #ifdef __cplusplus
3493 extern "C" {
3494 #endif
3495 
3496 const char *upb_msgdef_fullname(const upb_msgdef *m);
3497 const upb_filedef *upb_msgdef_file(const upb_msgdef *m);
3498 const char *upb_msgdef_name(const upb_msgdef *m);
3499 int upb_msgdef_numoneofs(const upb_msgdef *m);
3501 bool upb_msgdef_mapentry(const upb_msgdef *m);
3505 const upb_fielddef *upb_msgdef_itof(const upb_msgdef *m, uint32_t i);
3506 const upb_fielddef *upb_msgdef_ntof(const upb_msgdef *m, const char *name,
3507  size_t len);
3508 const upb_oneofdef *upb_msgdef_ntoo(const upb_msgdef *m, const char *name,
3509  size_t len);
3510 int upb_msgdef_numfields(const upb_msgdef *m);
3511 int upb_msgdef_numoneofs(const upb_msgdef *m);
3512 
3514  const char *name) {
3515  return upb_msgdef_ntoo(m, name, strlen(name));
3516 }
3517 
3519  const char *name) {
3520  return upb_msgdef_ntof(m, name, strlen(name));
3521 }
3522 
3523 /* Internal-only. */
3524 size_t upb_msgdef_selectorcount(const upb_msgdef *m);
3525 uint32_t upb_msgdef_submsgfieldcount(const upb_msgdef *m);
3526 
3527 /* Lookup of either field or oneof by name. Returns whether either was found.
3528  * If the return is true, then the found def will be set, and the non-found
3529  * one set to NULL. */
3530 bool upb_msgdef_lookupname(const upb_msgdef *m, const char *name, size_t len,
3531  const upb_fielddef **f, const upb_oneofdef **o);
3532 
3534  const upb_fielddef **f,
3535  const upb_oneofdef **o) {
3536  return upb_msgdef_lookupname(m, name, strlen(name), f, o);
3537 }
3538 
3539 /* Iteration over fields and oneofs. For example:
3540  *
3541  * upb_msg_field_iter i;
3542  * for(upb_msg_field_begin(&i, m);
3543  * !upb_msg_field_done(&i);
3544  * upb_msg_field_next(&i)) {
3545  * upb_fielddef *f = upb_msg_iter_field(&i);
3546  * // ...
3547  * }
3548  *
3549  * For C we don't have separate iterators for const and non-const.
3550  * It is the caller's responsibility to cast the upb_fielddef* to
3551  * const if the upb_msgdef* is const. */
3554 bool upb_msg_field_done(const upb_msg_field_iter *iter);
3558  const upb_msg_field_iter * iter2);
3559 
3560 /* Similar to above, we also support iterating through the oneofs in a
3561  * msgdef. */
3562 void upb_msg_oneof_begin(upb_msg_oneof_iter * iter, const upb_msgdef *m);
3564 bool upb_msg_oneof_done(const upb_msg_oneof_iter *iter);
3568  const upb_msg_oneof_iter *iter2);
3569 
3570 #ifdef __cplusplus
3571 } /* extern "C" */
3572 
3573 /* Structure that describes a single .proto message type. */
3574 class upb::MessageDefPtr {
3575  public:
3576  MessageDefPtr() : ptr_(nullptr) {}
3577  explicit MessageDefPtr(const upb_msgdef *ptr) : ptr_(ptr) {}
3578 
3579  const upb_msgdef *ptr() const { return ptr_; }
3580  explicit operator bool() const { return ptr_ != nullptr; }
3581 
3582  const char* full_name() const { return upb_msgdef_fullname(ptr_); }
3583  const char* name() const { return upb_msgdef_name(ptr_); }
3584 
3585  /* The number of fields that belong to the MessageDef. */
3586  int field_count() const { return upb_msgdef_numfields(ptr_); }
3587 
3588  /* The number of oneofs that belong to the MessageDef. */
3589  int oneof_count() const { return upb_msgdef_numoneofs(ptr_); }
3590 
3591  upb_syntax_t syntax() const { return upb_msgdef_syntax(ptr_); }
3592 
3593  /* These return null pointers if the field is not found. */
3594  FieldDefPtr FindFieldByNumber(uint32_t number) const {
3595  return FieldDefPtr(upb_msgdef_itof(ptr_, number));
3596  }
3597  FieldDefPtr FindFieldByName(const char* name, size_t len) const {
3598  return FieldDefPtr(upb_msgdef_ntof(ptr_, name, len));
3599  }
3600  FieldDefPtr FindFieldByName(const char *name) const {
3601  return FieldDefPtr(upb_msgdef_ntofz(ptr_, name));
3602  }
3603 
3604  template <class T>
3605  FieldDefPtr FindFieldByName(const T& str) const {
3606  return FindFieldByName(str.c_str(), str.size());
3607  }
3608 
3609  OneofDefPtr FindOneofByName(const char* name, size_t len) const {
3610  return OneofDefPtr(upb_msgdef_ntoo(ptr_, name, len));
3611  }
3612 
3613  OneofDefPtr FindOneofByName(const char *name) const {
3614  return OneofDefPtr(upb_msgdef_ntooz(ptr_, name));
3615  }
3616 
3617  template <class T>
3618  OneofDefPtr FindOneofByName(const T &str) const {
3619  return FindOneofByName(str.c_str(), str.size());
3620  }
3621 
3622  /* Is this message a map entry? */
3623  bool mapentry() const { return upb_msgdef_mapentry(ptr_); }
3624 
3625  /* Return the type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for
3626  * non-well-known message. */
3627  upb_wellknowntype_t wellknowntype() const {
3628  return upb_msgdef_wellknowntype(ptr_);
3629  }
3630 
3631  /* Whether is a number wrapper. */
3632  bool isnumberwrapper() const { return upb_msgdef_isnumberwrapper(ptr_); }
3633 
3634  /* Iteration over fields. The order is undefined. */
3635  class const_field_iterator
3636  : public std::iterator<std::forward_iterator_tag, FieldDefPtr> {
3637  public:
3638  void operator++() { upb_msg_field_next(&iter_); }
3639 
3640  FieldDefPtr operator*() const {
3641  return FieldDefPtr(upb_msg_iter_field(&iter_));
3642  }
3643 
3644  bool operator!=(const const_field_iterator &other) const {
3645  return !upb_msg_field_iter_isequal(&iter_, &other.iter_);
3646  }
3647 
3648  bool operator==(const const_field_iterator &other) const {
3649  return upb_msg_field_iter_isequal(&iter_, &other.iter_);
3650  }
3651 
3652  private:
3653  friend class MessageDefPtr;
3654 
3655  explicit const_field_iterator() {}
3656 
3657  explicit const_field_iterator(MessageDefPtr msg) {
3658  upb_msg_field_begin(&iter_, msg.ptr());
3659  }
3660 
3661  static const_field_iterator end() {
3662  const_field_iterator iter;
3663  upb_msg_field_iter_setdone(&iter.iter_);
3664  return iter;
3665  }
3666 
3667  upb_msg_field_iter iter_;
3668  };
3669 
3670  /* Iteration over oneofs. The order is undefined. */
3671  class const_oneof_iterator
3672  : public std::iterator<std::forward_iterator_tag, OneofDefPtr> {
3673  public:
3674 
3675  void operator++() { upb_msg_oneof_next(&iter_); }
3676 
3677  OneofDefPtr operator*() const {
3678  return OneofDefPtr(upb_msg_iter_oneof(&iter_));
3679  }
3680 
3681  bool operator!=(const const_oneof_iterator& other) const {
3682  return !upb_msg_oneof_iter_isequal(&iter_, &other.iter_);
3683  }
3684 
3685  bool operator==(const const_oneof_iterator &other) const {
3686  return upb_msg_oneof_iter_isequal(&iter_, &other.iter_);
3687  }
3688 
3689  private:
3690  friend class MessageDefPtr;
3691 
3692  const_oneof_iterator() {}
3693 
3694  explicit const_oneof_iterator(MessageDefPtr msg) {
3695  upb_msg_oneof_begin(&iter_, msg.ptr());
3696  }
3697 
3698  static const_oneof_iterator end() {
3699  const_oneof_iterator iter;
3700  upb_msg_oneof_iter_setdone(&iter.iter_);
3701  return iter;
3702  }
3703 
3704  upb_msg_oneof_iter iter_;
3705  };
3706 
3707  class ConstFieldAccessor {
3708  public:
3709  explicit ConstFieldAccessor(const upb_msgdef* md) : md_(md) {}
3710  const_field_iterator begin() { return MessageDefPtr(md_).field_begin(); }
3711  const_field_iterator end() { return MessageDefPtr(md_).field_end(); }
3712  private:
3713  const upb_msgdef* md_;
3714  };
3715 
3716  class ConstOneofAccessor {
3717  public:
3718  explicit ConstOneofAccessor(const upb_msgdef* md) : md_(md) {}
3719  const_oneof_iterator begin() { return MessageDefPtr(md_).oneof_begin(); }
3720  const_oneof_iterator end() { return MessageDefPtr(md_).oneof_end(); }
3721  private:
3722  const upb_msgdef* md_;
3723  };
3724 
3725  const_field_iterator field_begin() const {
3726  return const_field_iterator(*this);
3727  }
3728 
3729  const_field_iterator field_end() const { return const_field_iterator::end(); }
3730 
3731  const_oneof_iterator oneof_begin() const {
3732  return const_oneof_iterator(*this);
3733  }
3734 
3735  const_oneof_iterator oneof_end() const { return const_oneof_iterator::end(); }
3736 
3737  ConstFieldAccessor fields() const { return ConstFieldAccessor(ptr()); }
3738  ConstOneofAccessor oneofs() const { return ConstOneofAccessor(ptr()); }
3739 
3740  private:
3741  const upb_msgdef* ptr_;
3742 };
3743 
3744 inline upb::MessageDefPtr upb::FieldDefPtr::message_subdef() const {
3745  return MessageDefPtr(upb_fielddef_msgsubdef(ptr_));
3746 }
3747 
3748 inline upb::MessageDefPtr upb::FieldDefPtr::containing_type() const {
3749  return MessageDefPtr(upb_fielddef_containingtype(ptr_));
3750 }
3751 
3752 inline upb::MessageDefPtr upb::OneofDefPtr::containing_type() const {
3753  return MessageDefPtr(upb_oneofdef_containingtype(ptr_));
3754 }
3755 
3756 #endif /* __cplusplus */
3757 
3758 /* upb_enumdef ****************************************************************/
3759 
3761 
3762 const char *upb_enumdef_fullname(const upb_enumdef *e);
3763 const char *upb_enumdef_name(const upb_enumdef *e);
3764 const upb_filedef *upb_enumdef_file(const upb_enumdef *e);
3765 int32_t upb_enumdef_default(const upb_enumdef *e);
3766 int upb_enumdef_numvals(const upb_enumdef *e);
3767 
3768 /* Enum lookups:
3769  * - ntoi: look up a name with specified length.
3770  * - ntoiz: look up a name provided as a null-terminated string.
3771  * - iton: look up an integer, returning the name as a null-terminated
3772  * string. */
3773 bool upb_enumdef_ntoi(const upb_enumdef *e, const char *name, size_t len,
3774  int32_t *num);
3776  const char *name, int32_t *num) {
3777  return upb_enumdef_ntoi(e, name, strlen(name), num);
3778 }
3779 const char *upb_enumdef_iton(const upb_enumdef *e, int32_t num);
3780 
3781 /* upb_enum_iter i;
3782  * for(upb_enum_begin(&i, e); !upb_enum_done(&i); upb_enum_next(&i)) {
3783  * // ...
3784  * }
3785  */
3786 void upb_enum_begin(upb_enum_iter *iter, const upb_enumdef *e);
3787 void upb_enum_next(upb_enum_iter *iter);
3788 bool upb_enum_done(upb_enum_iter *iter);
3789 const char *upb_enum_iter_name(upb_enum_iter *iter);
3790 int32_t upb_enum_iter_number(upb_enum_iter *iter);
3791 
3792 #ifdef __cplusplus
3793 
3794 class upb::EnumDefPtr {
3795  public:
3796  EnumDefPtr() : ptr_(nullptr) {}
3797  explicit EnumDefPtr(const upb_enumdef* ptr) : ptr_(ptr) {}
3798 
3799  const upb_enumdef* ptr() const { return ptr_; }
3800  explicit operator bool() const { return ptr_ != nullptr; }
3801 
3802  const char* full_name() const { return upb_enumdef_fullname(ptr_); }
3803  const char* name() const { return upb_enumdef_name(ptr_); }
3804 
3805  /* The value that is used as the default when no field default is specified.
3806  * If not set explicitly, the first value that was added will be used.
3807  * The default value must be a member of the enum.
3808  * Requires that value_count() > 0. */
3809  int32_t default_value() const { return upb_enumdef_default(ptr_); }
3810 
3811  /* Returns the number of values currently defined in the enum. Note that
3812  * multiple names can refer to the same number, so this may be greater than
3813  * the total number of unique numbers. */
3814  int value_count() const { return upb_enumdef_numvals(ptr_); }
3815 
3816  /* Lookups from name to integer, returning true if found. */
3817  bool FindValueByName(const char *name, int32_t *num) const {
3818  return upb_enumdef_ntoiz(ptr_, name, num);
3819  }
3820 
3821  /* Finds the name corresponding to the given number, or NULL if none was
3822  * found. If more than one name corresponds to this number, returns the
3823  * first one that was added. */
3824  const char *FindValueByNumber(int32_t num) const {
3825  return upb_enumdef_iton(ptr_, num);
3826  }
3827 
3828  /* Iteration over name/value pairs. The order is undefined.
3829  * Adding an enum val invalidates any iterators.
3830  *
3831  * TODO: make compatible with range-for, with elements as pairs? */
3832  class Iterator {
3833  public:
3834  explicit Iterator(EnumDefPtr e) { upb_enum_begin(&iter_, e.ptr()); }
3835 
3836  int32_t number() { return upb_enum_iter_number(&iter_); }
3837  const char *name() { return upb_enum_iter_name(&iter_); }
3838  bool Done() { return upb_enum_done(&iter_); }
3839  void Next() { return upb_enum_next(&iter_); }
3840 
3841  private:
3842  upb_enum_iter iter_;
3843  };
3844 
3845  private:
3846  const upb_enumdef *ptr_;
3847 };
3848 
3849 inline upb::EnumDefPtr upb::FieldDefPtr::enum_subdef() const {
3850  return EnumDefPtr(upb_fielddef_enumsubdef(ptr_));
3851 }
3852 
3853 #endif /* __cplusplus */
3854 
3855 /* upb_filedef ****************************************************************/
3856 
3857 #ifdef __cplusplus
3858 extern "C" {
3859 #endif
3860 
3861 const char *upb_filedef_name(const upb_filedef *f);
3862 const char *upb_filedef_package(const upb_filedef *f);
3863 const char *upb_filedef_phpprefix(const upb_filedef *f);
3864 const char *upb_filedef_phpnamespace(const upb_filedef *f);
3866 int upb_filedef_depcount(const upb_filedef *f);
3867 int upb_filedef_msgcount(const upb_filedef *f);
3868 int upb_filedef_enumcount(const upb_filedef *f);
3869 const upb_filedef *upb_filedef_dep(const upb_filedef *f, int i);
3870 const upb_msgdef *upb_filedef_msg(const upb_filedef *f, int i);
3871 const upb_enumdef *upb_filedef_enum(const upb_filedef *f, int i);
3872 
3873 #ifdef __cplusplus
3874 } /* extern "C" */
3875 
3876 /* Class that represents a .proto file with some things defined in it.
3877  *
3878  * Many users won't care about FileDefs, but they are necessary if you want to
3879  * read the values of file-level options. */
3880 class upb::FileDefPtr {
3881  public:
3882  explicit FileDefPtr(const upb_filedef *ptr) : ptr_(ptr) {}
3883 
3884  const upb_filedef* ptr() const { return ptr_; }
3885  explicit operator bool() const { return ptr_ != nullptr; }
3886 
3887  /* Get/set name of the file (eg. "foo/bar.proto"). */
3888  const char* name() const { return upb_filedef_name(ptr_); }
3889 
3890  /* Package name for definitions inside the file (eg. "foo.bar"). */
3891  const char* package() const { return upb_filedef_package(ptr_); }
3892 
3893  /* Sets the php class prefix which is prepended to all php generated classes
3894  * from this .proto. Default is empty. */
3895  const char* phpprefix() const { return upb_filedef_phpprefix(ptr_); }
3896 
3897  /* Use this option to change the namespace of php generated classes. Default
3898  * is empty. When this option is empty, the package name will be used for
3899  * determining the namespace. */
3900  const char* phpnamespace() const { return upb_filedef_phpnamespace(ptr_); }
3901 
3902  /* Syntax for the file. Defaults to proto2. */
3903  upb_syntax_t syntax() const { return upb_filedef_syntax(ptr_); }
3904 
3905  /* Get the list of dependencies from the file. These are returned in the
3906  * order that they were added to the FileDefPtr. */
3907  int dependency_count() const { return upb_filedef_depcount(ptr_); }
3908  const FileDefPtr dependency(int index) const {
3909  return FileDefPtr(upb_filedef_dep(ptr_, index));
3910  }
3911 
3912  private:
3913  const upb_filedef* ptr_;
3914 };
3915 
3916 #endif /* __cplusplus */
3917 
3918 /* upb_symtab *****************************************************************/
3919 
3920 #ifdef __cplusplus
3921 extern "C" {
3922 #endif
3923 
3925 void upb_symtab_free(upb_symtab* s);
3926 const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym);
3928  const upb_symtab *s, const char *sym, size_t len);
3929 const upb_enumdef *upb_symtab_lookupenum(const upb_symtab *s, const char *sym);
3930 const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name);
3931 int upb_symtab_filecount(const upb_symtab *s);
3934  upb_status *status);
3935 
3936 /* For generated code only: loads a generated descriptor. */
3937 typedef struct upb_def_init {
3938  struct upb_def_init **deps;
3939  const char *filename;
3941 } upb_def_init;
3942 
3944 
3945 #ifdef __cplusplus
3946 } /* extern "C" */
3947 
3948 /* Non-const methods in upb::SymbolTable are NOT thread-safe. */
3949 class upb::SymbolTable {
3950  public:
3951  SymbolTable() : ptr_(upb_symtab_new(), upb_symtab_free) {}
3952  explicit SymbolTable(upb_symtab* s) : ptr_(s, upb_symtab_free) {}
3953 
3954  const upb_symtab* ptr() const { return ptr_.get(); }
3955  upb_symtab* ptr() { return ptr_.get(); }
3956 
3957  /* Finds an entry in the symbol table with this exact name. If not found,
3958  * returns NULL. */
3959  MessageDefPtr LookupMessage(const char *sym) const {
3960  return MessageDefPtr(upb_symtab_lookupmsg(ptr_.get(), sym));
3961  }
3962 
3963  EnumDefPtr LookupEnum(const char *sym) const {
3964  return EnumDefPtr(upb_symtab_lookupenum(ptr_.get(), sym));
3965  }
3966 
3967  FileDefPtr LookupFile(const char *name) const {
3968  return FileDefPtr(upb_symtab_lookupfile(ptr_.get(), name));
3969  }
3970 
3971  /* TODO: iteration? */
3972 
3973  /* Adds the given serialized FileDescriptorProto to the pool. */
3974  FileDefPtr AddFile(const google_protobuf_FileDescriptorProto *file_proto,
3975  Status *status) {
3976  return FileDefPtr(
3977  upb_symtab_addfile(ptr_.get(), file_proto, status->ptr()));
3978  }
3979 
3980  private:
3981  std::unique_ptr<upb_symtab, decltype(&upb_symtab_free)> ptr_;
3982 };
3983 
3984 UPB_INLINE const char* upb_safecstr(const std::string& str) {
3985  UPB_ASSERT(str.size() == std::strlen(str.c_str()));
3986  return str.c_str();
3987 }
3988 
3989 #endif /* __cplusplus */
3990 
3991 #endif /* UPB_DEF_H_ */
3992 /*
3993 ** upb::Handlers (upb_handlers)
3994 **
3995 ** A upb_handlers is like a virtual table for a upb_msgdef. Each field of the
3996 ** message can have associated functions that will be called when we are
3997 ** parsing or visiting a stream of data. This is similar to how handlers work
3998 ** in SAX (the Simple API for XML).
3999 **
4000 ** The handlers have no idea where the data is coming from, so a single set of
4001 ** handlers could be used with two completely different data sources (for
4002 ** example, a parser and a visitor over in-memory objects). This decoupling is
4003 ** the most important feature of upb, because it allows parsers and serializers
4004 ** to be highly reusable.
4005 **
4006 ** This is a mixed C/C++ interface that offers a full API to both languages.
4007 ** See the top-level README for more information.
4008 */
4009 
4010 #ifndef UPB_HANDLERS_H
4011 #define UPB_HANDLERS_H
4012 
4013 
4014 #ifdef __cplusplus
4015 namespace upb {
4016 class HandlersPtr;
4017 class HandlerCache;
4018 template <class T> class Handler;
4019 template <class T> struct CanonicalType;
4020 } /* namespace upb */
4021 #endif
4022 
4023 
4024 /* The maximum depth that the handler graph can have. This is a resource limit
4025  * for the C stack since we sometimes need to recursively traverse the graph.
4026  * Cycles are ok; the traversal will stop when it detects a cycle, but we must
4027  * hit the cycle before the maximum depth is reached.
4028  *
4029  * If having a single static limit is too inflexible, we can add another variant
4030  * of Handlers::Freeze that allows specifying this as a parameter. */
4031 #define UPB_MAX_HANDLER_DEPTH 64
4032 
4033 /* All the different types of handlers that can be registered.
4034  * Only needed for the advanced functions in upb::Handlers. */
4035 typedef enum {
4051 
4052 #define UPB_HANDLER_MAX (UPB_HANDLER_ENDSEQ+1)
4053 
4054 #define UPB_BREAK NULL
4055 
4056 /* A convenient definition for when no closure is needed. */
4057 extern char _upb_noclosure;
4058 #define UPB_NO_CLOSURE &_upb_noclosure
4059 
4060 /* A selector refers to a specific field handler in the Handlers object
4061  * (for example: the STARTSUBMSG handler for field "field15"). */
4062 typedef int32_t upb_selector_t;
4063 
4064 /* Static selectors for upb::Handlers. */
4065 #define UPB_STARTMSG_SELECTOR 0
4066 #define UPB_ENDMSG_SELECTOR 1
4067 #define UPB_UNKNOWN_SELECTOR 2
4068 #define UPB_STATIC_SELECTOR_COUNT 3
4069 
4070 /* Static selectors for upb::BytesHandler. */
4071 #define UPB_STARTSTR_SELECTOR 0
4072 #define UPB_STRING_SELECTOR 1
4073 #define UPB_ENDSTR_SELECTOR 2
4074 
4075 #ifdef __cplusplus
4076 template<class T> const void *UniquePtrForType() {
4077  static const char ch = 0;
4078  return &ch;
4079 }
4080 #endif
4081 
4082 /* upb_handlers ************************************************************/
4083 
4084 /* Handler attributes, to be registered with the handler itself. */
4085 typedef struct {
4086  const void *handler_data;
4087  const void *closure_type;
4088  const void *return_closure_type;
4089  bool alwaysok;
4090 } upb_handlerattr;
4091 
4092 #define UPB_HANDLERATTR_INIT {NULL, NULL, NULL, false}
4093 
4094 /* Bufhandle, data passed along with a buffer to indicate its provenance. */
4095 typedef struct {
4096  /* The beginning of the buffer. This may be different than the pointer
4097  * passed to a StringBuf handler because the handler may receive data
4098  * that is from the middle or end of a larger buffer. */
4099  const char *buf;
4100 
4101  /* The offset within the attached object where this buffer begins. Only
4102  * meaningful if there is an attached object. */
4103  size_t objofs;
4104 
4105  /* The attached object (if any) and a pointer representing its type. */
4106  const void *obj;
4107  const void *objtype;
4108 
4109 #ifdef __cplusplus
4110  template <class T>
4111  void SetAttachedObject(const T* _obj) {
4112  obj = _obj;
4113  objtype = UniquePtrForType<T>();
4114  }
4115 
4116  template <class T>
4117  const T *GetAttachedObject() const {
4118  return objtype == UniquePtrForType<T>() ? static_cast<const T *>(obj)
4119  : NULL;
4120  }
4121 #endif
4122 } upb_bufhandle;
4123 
4124 #define UPB_BUFHANDLE_INIT {NULL, 0, NULL, NULL}
4125 
4126 /* Handler function typedefs. */
4127 typedef void upb_handlerfree(void *d);
4128 typedef bool upb_unknown_handlerfunc(void *c, const void *hd, const char *buf,
4129  size_t n);
4130 typedef bool upb_startmsg_handlerfunc(void *c, const void*);
4131 typedef bool upb_endmsg_handlerfunc(void *c, const void *, upb_status *status);
4132 typedef void* upb_startfield_handlerfunc(void *c, const void *hd);
4133 typedef bool upb_endfield_handlerfunc(void *c, const void *hd);
4134 typedef bool upb_int32_handlerfunc(void *c, const void *hd, int32_t val);
4135 typedef bool upb_int64_handlerfunc(void *c, const void *hd, int64_t val);
4136 typedef bool upb_uint32_handlerfunc(void *c, const void *hd, uint32_t val);
4137 typedef bool upb_uint64_handlerfunc(void *c, const void *hd, uint64_t val);
4138 typedef bool upb_float_handlerfunc(void *c, const void *hd, float val);
4139 typedef bool upb_double_handlerfunc(void *c, const void *hd, double val);
4140 typedef bool upb_bool_handlerfunc(void *c, const void *hd, bool val);
4141 typedef void *upb_startstr_handlerfunc(void *c, const void *hd,
4142  size_t size_hint);
4143 typedef size_t upb_string_handlerfunc(void *c, const void *hd, const char *buf,
4144  size_t n, const upb_bufhandle* handle);
4145 
4146 struct upb_handlers;
4148 
4149 #ifdef __cplusplus
4150 extern "C" {
4151 #endif
4152 
4153 /* Mutating accessors. */
4159  const upb_handlerattr *attr);
4161  const upb_handlerattr *attr);
4163  const upb_handlerattr *attr);
4166  const upb_handlerattr *attr);
4169  const upb_handlerattr *attr);
4172  const upb_handlerattr *attr);
4175  const upb_handlerattr *attr);
4178  const upb_handlerattr *attr);
4181  const upb_handlerattr *attr);
4184  const upb_handlerattr *attr);
4187  const upb_handlerattr *attr);
4190  const upb_handlerattr *attr);
4193  const upb_handlerattr *attr);
4196  const upb_handlerattr *attr);
4199  const upb_handlerattr *attr);
4202  const upb_handlerattr *attr);
4205  const upb_handlerattr *attr);
4206 
4207 /* Read-only accessors. */
4209  const upb_fielddef *f);
4211  upb_selector_t sel);
4213  const void **handler_data);
4215  upb_handlerattr *attr);
4216 
4217 /* "Static" methods */
4220  upb_selector_t *s);
4222  return start + 1;
4223 }
4224 
4225 /* Internal-only. */
4227 uint32_t upb_handlers_selectorcount(const upb_fielddef *f);
4228 
4229 #ifdef __cplusplus
4230 } /* extern "C" */
4231 
4232 namespace upb {
4233 typedef upb_handlers Handlers;
4234 }
4235 
4236 /* Convenience macros for creating a Handler object that is wrapped with a
4237  * type-safe wrapper function that converts the "void*" parameters/returns
4238  * of the underlying C API into nice C++ function.
4239  *
4240  * Sample usage:
4241  * void OnValue1(MyClosure* c, const MyHandlerData* d, int32_t val) {
4242  * // do stuff ...
4243  * }
4244  *
4245  * // Handler that doesn't need any data bound to it.
4246  * void OnValue2(MyClosure* c, int32_t val) {
4247  * // do stuff ...
4248  * }
4249  *
4250  * // Handler that returns bool so it can return failure if necessary.
4251  * bool OnValue3(MyClosure* c, int32_t val) {
4252  * // do stuff ...
4253  * return ok;
4254  * }
4255  *
4256  * // Member function handler.
4257  * class MyClosure {
4258  * public:
4259  * void OnValue(int32_t val) {
4260  * // do stuff ...
4261  * }
4262  * };
4263  *
4264  * // Takes ownership of the MyHandlerData.
4265  * handlers->SetInt32Handler(f1, UpbBind(OnValue1, new MyHandlerData(...)));
4266  * handlers->SetInt32Handler(f2, UpbMakeHandler(OnValue2));
4267  * handlers->SetInt32Handler(f1, UpbMakeHandler(OnValue3));
4268  * handlers->SetInt32Handler(f2, UpbMakeHandler(&MyClosure::OnValue));
4269  */
4270 
4271 /* In C++11, the "template" disambiguator can appear even outside templates,
4272  * so all calls can safely use this pair of macros. */
4273 
4274 #define UpbMakeHandler(f) upb::MatchFunc(f).template GetFunc<f>()
4275 
4276 /* We have to be careful to only evaluate "d" once. */
4277 #define UpbBind(f, d) upb::MatchFunc(f).template GetFunc<f>((d))
4278 
4279 /* Handler: a struct that contains the (handler, data, deleter) tuple that is
4280  * used to register all handlers. Users can Make() these directly but it's
4281  * more convenient to use the UpbMakeHandler/UpbBind macros above. */
4282 template <class T> class upb::Handler {
4283  public:
4284  /* The underlying, handler function signature that upb uses internally. */
4285  typedef T FuncPtr;
4286 
4287  /* Intentionally implicit. */
4288  template <class F> Handler(F func);
4289  ~Handler() { UPB_ASSERT(registered_); }
4290 
4291  void AddCleanup(upb_handlers* h) const;
4292  FuncPtr handler() const { return handler_; }
4293  const upb_handlerattr& attr() const { return attr_; }
4294 
4295  private:
4296  Handler(const Handler&) = delete;
4297  Handler& operator=(const Handler&) = delete;
4298 
4299  FuncPtr handler_;
4300  mutable upb_handlerattr attr_;
4301  mutable bool registered_;
4302  void *cleanup_data_;
4303  upb_handlerfree *cleanup_func_;
4304 };
4305 
4306 /* A upb::Handlers object represents the set of handlers associated with a
4307  * message in the graph of messages. You can think of it as a big virtual
4308  * table with functions corresponding to all the events that can fire while
4309  * parsing or visiting a message of a specific type.
4310  *
4311  * Any handlers that are not set behave as if they had successfully consumed
4312  * the value. Any unset Start* handlers will propagate their closure to the
4313  * inner frame.
4314  *
4315  * The easiest way to create the *Handler objects needed by the Set* methods is
4316  * with the UpbBind() and UpbMakeHandler() macros; see below. */
4317 class upb::HandlersPtr {
4318  public:
4319  HandlersPtr(upb_handlers* ptr) : ptr_(ptr) {}
4320 
4321  upb_handlers* ptr() const { return ptr_; }
4322 
4323  typedef upb_selector_t Selector;
4324  typedef upb_handlertype_t Type;
4325 
4326  typedef Handler<void *(*)(void *, const void *)> StartFieldHandler;
4327  typedef Handler<bool (*)(void *, const void *)> EndFieldHandler;
4328  typedef Handler<bool (*)(void *, const void *)> StartMessageHandler;
4329  typedef Handler<bool (*)(void *, const void *, upb_status *)>
4330  EndMessageHandler;
4331  typedef Handler<void *(*)(void *, const void *, size_t)> StartStringHandler;
4332  typedef Handler<size_t (*)(void *, const void *, const char *, size_t,
4333  const upb_bufhandle *)>
4334  StringHandler;
4335 
4336  template <class T> struct ValueHandler {
4337  typedef Handler<bool(*)(void *, const void *, T)> H;
4338  };
4339 
4340  typedef ValueHandler<int32_t>::H Int32Handler;
4341  typedef ValueHandler<int64_t>::H Int64Handler;
4342  typedef ValueHandler<uint32_t>::H UInt32Handler;
4343  typedef ValueHandler<uint64_t>::H UInt64Handler;
4344  typedef ValueHandler<float>::H FloatHandler;
4345  typedef ValueHandler<double>::H DoubleHandler;
4346  typedef ValueHandler<bool>::H BoolHandler;
4347 
4348  /* Any function pointer can be converted to this and converted back to its
4349  * correct type. */
4350  typedef void GenericFunction();
4351 
4352  typedef void HandlersCallback(const void *closure, upb_handlers *h);
4353 
4354  /* Returns the msgdef associated with this handlers object. */
4355  MessageDefPtr message_def() const {
4356  return MessageDefPtr(upb_handlers_msgdef(ptr()));
4357  }
4358 
4359  /* Adds the given pointer and function to the list of cleanup functions that
4360  * will be run when these handlers are freed. If this pointer has previously
4361  * been registered, the function returns false and does nothing. */
4362  bool AddCleanup(void *ptr, upb_handlerfree *cleanup) {
4363  return upb_handlers_addcleanup(ptr_, ptr, cleanup);
4364  }
4365 
4366  /* Sets the startmsg handler for the message, which is defined as follows:
4367  *
4368  * bool startmsg(MyType* closure) {
4369  * // Called when the message begins. Returns true if processing should
4370  * // continue.
4371  * return true;
4372  * }
4373  */
4374  bool SetStartMessageHandler(const StartMessageHandler &h) {
4375  h.AddCleanup(ptr());
4376  return upb_handlers_setstartmsg(ptr(), h.handler(), &h.attr());
4377  }
4378 
4379  /* Sets the endmsg handler for the message, which is defined as follows:
4380  *
4381  * bool endmsg(MyType* closure, upb_status *status) {
4382  * // Called when processing of this message ends, whether in success or
4383  * // failure. "status" indicates the final status of processing, and
4384  * // can also be modified in-place to update the final status.
4385  * }
4386  */
4387  bool SetEndMessageHandler(const EndMessageHandler& h) {
4388  h.AddCleanup(ptr());
4389  return upb_handlers_setendmsg(ptr(), h.handler(), &h.attr());
4390  }
4391 
4392  /* Sets the value handler for the given field, which is defined as follows
4393  * (this is for an int32 field; other field types will pass their native
4394  * C/C++ type for "val"):
4395  *
4396  * bool OnValue(MyClosure* c, const MyHandlerData* d, int32_t val) {
4397  * // Called when the field's value is encountered. "d" contains
4398  * // whatever data was bound to this field when it was registered.
4399  * // Returns true if processing should continue.
4400  * return true;
4401  * }
4402  *
4403  * handers->SetInt32Handler(f, UpbBind(OnValue, new MyHandlerData(...)));
4404  *
4405  * The value type must exactly match f->type().
4406  * For example, a handler that takes an int32_t parameter may only be used for
4407  * fields of type UPB_TYPE_INT32 and UPB_TYPE_ENUM.
4408  *
4409  * Returns false if the handler failed to register; in this case the cleanup
4410  * handler (if any) will be called immediately.
4411  */
4412  bool SetInt32Handler(FieldDefPtr f, const Int32Handler &h) {
4413  h.AddCleanup(ptr());
4414  return upb_handlers_setint32(ptr(), f.ptr(), h.handler(), &h.attr());
4415  }
4416 
4417  bool SetInt64Handler (FieldDefPtr f, const Int64Handler& h) {
4418  h.AddCleanup(ptr());
4419  return upb_handlers_setint64(ptr(), f.ptr(), h.handler(), &h.attr());
4420  }
4421 
4422  bool SetUInt32Handler(FieldDefPtr f, const UInt32Handler& h) {
4423  h.AddCleanup(ptr());
4424  return upb_handlers_setuint32(ptr(), f.ptr(), h.handler(), &h.attr());
4425  }
4426 
4427  bool SetUInt64Handler(FieldDefPtr f, const UInt64Handler& h) {
4428  h.AddCleanup(ptr());
4429  return upb_handlers_setuint64(ptr(), f.ptr(), h.handler(), &h.attr());
4430  }
4431 
4432  bool SetFloatHandler (FieldDefPtr f, const FloatHandler& h) {
4433  h.AddCleanup(ptr());
4434  return upb_handlers_setfloat(ptr(), f.ptr(), h.handler(), &h.attr());
4435  }
4436 
4437  bool SetDoubleHandler(FieldDefPtr f, const DoubleHandler& h) {
4438  h.AddCleanup(ptr());
4439  return upb_handlers_setdouble(ptr(), f.ptr(), h.handler(), &h.attr());
4440  }
4441 
4442  bool SetBoolHandler(FieldDefPtr f, const BoolHandler &h) {
4443  h.AddCleanup(ptr());
4444  return upb_handlers_setbool(ptr(), f.ptr(), h.handler(), &h.attr());
4445  }
4446 
4447  /* Like the previous, but templated on the type on the value (ie. int32).
4448  * This is mostly useful to call from other templates. To call this you must
4449  * specify the template parameter explicitly, ie:
4450  * h->SetValueHandler<T>(f, UpbBind(MyHandler<T>, MyData)); */
4451  template <class T>
4452  bool SetValueHandler(
4453  FieldDefPtr f,
4454  const typename ValueHandler<typename CanonicalType<T>::Type>::H &handler);
4455 
4456  /* Sets handlers for a string field, which are defined as follows:
4457  *
4458  * MySubClosure* startstr(MyClosure* c, const MyHandlerData* d,
4459  * size_t size_hint) {
4460  * // Called when a string value begins. The return value indicates the
4461  * // closure for the string. "size_hint" indicates the size of the
4462  * // string if it is known, however if the string is length-delimited
4463  * // and the end-of-string is not available size_hint will be zero.
4464  * // This case is indistinguishable from the case where the size is
4465  * // known to be zero.
4466  * //
4467  * // TODO(haberman): is it important to distinguish these cases?
4468  * // If we had ssize_t as a type we could make -1 "unknown", but
4469  * // ssize_t is POSIX (not ANSI) and therefore less portable.
4470  * // In practice I suspect it won't be important to distinguish.
4471  * return closure;
4472  * }
4473  *
4474  * size_t str(MyClosure* closure, const MyHandlerData* d,
4475  * const char *str, size_t len) {
4476  * // Called for each buffer of string data; the multiple physical buffers
4477  * // are all part of the same logical string. The return value indicates
4478  * // how many bytes were consumed. If this number is less than "len",
4479  * // this will also indicate that processing should be halted for now,
4480  * // like returning false or UPB_BREAK from any other callback. If
4481  * // number is greater than "len", the excess bytes will be skipped over
4482  * // and not passed to the callback.
4483  * return len;
4484  * }
4485  *
4486  * bool endstr(MyClosure* c, const MyHandlerData* d) {
4487  * // Called when a string value ends. Return value indicates whether
4488  * // processing should continue.
4489  * return true;
4490  * }
4491  */
4492  bool SetStartStringHandler(FieldDefPtr f, const StartStringHandler &h) {
4493  h.AddCleanup(ptr());
4494  return upb_handlers_setstartstr(ptr(), f.ptr(), h.handler(), &h.attr());
4495  }
4496 
4497  bool SetStringHandler(FieldDefPtr f, const StringHandler& h) {
4498  h.AddCleanup(ptr());
4499  return upb_handlers_setstring(ptr(), f.ptr(), h.handler(), &h.attr());
4500  }
4501 
4502  bool SetEndStringHandler(FieldDefPtr f, const EndFieldHandler& h) {
4503  h.AddCleanup(ptr());
4504  return upb_handlers_setendstr(ptr(), f.ptr(), h.handler(), &h.attr());
4505  }
4506 
4507  /* Sets the startseq handler, which is defined as follows:
4508  *
4509  * MySubClosure *startseq(MyClosure* c, const MyHandlerData* d) {
4510  * // Called when a sequence (repeated field) begins. The returned
4511  * // pointer indicates the closure for the sequence (or UPB_BREAK
4512  * // to interrupt processing).
4513  * return closure;
4514  * }
4515  *
4516  * h->SetStartSequenceHandler(f, UpbBind(startseq, new MyHandlerData(...)));
4517  *
4518  * Returns "false" if "f" does not belong to this message or is not a
4519  * repeated field.
4520  */
4521  bool SetStartSequenceHandler(FieldDefPtr f, const StartFieldHandler &h) {
4522  h.AddCleanup(ptr());
4523  return upb_handlers_setstartseq(ptr(), f.ptr(), h.handler(), &h.attr());
4524  }
4525 
4526  /* Sets the startsubmsg handler for the given field, which is defined as
4527  * follows:
4528  *
4529  * MySubClosure* startsubmsg(MyClosure* c, const MyHandlerData* d) {
4530  * // Called when a submessage begins. The returned pointer indicates the
4531  * // closure for the sequence (or UPB_BREAK to interrupt processing).
4532  * return closure;
4533  * }
4534  *
4535  * h->SetStartSubMessageHandler(f, UpbBind(startsubmsg,
4536  * new MyHandlerData(...)));
4537  *
4538  * Returns "false" if "f" does not belong to this message or is not a
4539  * submessage/group field.
4540  */
4541  bool SetStartSubMessageHandler(FieldDefPtr f, const StartFieldHandler& h) {
4542  h.AddCleanup(ptr());
4543  return upb_handlers_setstartsubmsg(ptr(), f.ptr(), h.handler(), &h.attr());
4544  }
4545 
4546  /* Sets the endsubmsg handler for the given field, which is defined as
4547  * follows:
4548  *
4549  * bool endsubmsg(MyClosure* c, const MyHandlerData* d) {
4550  * // Called when a submessage ends. Returns true to continue processing.
4551  * return true;
4552  * }
4553  *
4554  * Returns "false" if "f" does not belong to this message or is not a
4555  * submessage/group field.
4556  */
4557  bool SetEndSubMessageHandler(FieldDefPtr f, const EndFieldHandler &h) {
4558  h.AddCleanup(ptr());
4559  return upb_handlers_setendsubmsg(ptr(), f.ptr(), h.handler(), &h.attr());
4560  }
4561 
4562  /* Starts the endsubseq handler for the given field, which is defined as
4563  * follows:
4564  *
4565  * bool endseq(MyClosure* c, const MyHandlerData* d) {
4566  * // Called when a sequence ends. Returns true continue processing.
4567  * return true;
4568  * }
4569  *
4570  * Returns "false" if "f" does not belong to this message or is not a
4571  * repeated field.
4572  */
4573  bool SetEndSequenceHandler(FieldDefPtr f, const EndFieldHandler &h) {
4574  h.AddCleanup(ptr());
4575  return upb_handlers_setendseq(ptr(), f.ptr(), h.handler(), &h.attr());
4576  }
4577 
4578  private:
4579  upb_handlers* ptr_;
4580 };
4581 
4582 #endif /* __cplusplus */
4583 
4584 /* upb_handlercache ***********************************************************/
4585 
4586 /* A upb_handlercache lazily builds and caches upb_handlers. You pass it a
4587  * function (with optional closure) that can build handlers for a given
4588  * message on-demand, and the cache maintains a map of msgdef->handlers. */
4589 
4590 #ifdef __cplusplus
4591 extern "C" {
4592 #endif
4593 
4594 struct upb_handlercache;
4596 
4597 typedef void upb_handlers_callback(const void *closure, upb_handlers *h);
4598 
4600  const void *closure);
4603  const upb_msgdef *md);
4605  upb_handlerfree *hfree);
4606 
4607 #ifdef __cplusplus
4608 } /* extern "C" */
4609 
4610 class upb::HandlerCache {
4611  public:
4612  HandlerCache(upb_handlers_callback *callback, const void *closure)
4613  : ptr_(upb_handlercache_new(callback, closure), upb_handlercache_free) {}
4614  HandlerCache(HandlerCache&&) = default;
4615  HandlerCache& operator=(HandlerCache&&) = default;
4616  HandlerCache(upb_handlercache* c) : ptr_(c, upb_handlercache_free) {}
4617 
4618  upb_handlercache* ptr() { return ptr_.get(); }
4619 
4620  const upb_handlers *Get(MessageDefPtr md) {
4621  return upb_handlercache_get(ptr_.get(), md.ptr());
4622  }
4623 
4624  private:
4625  std::unique_ptr<upb_handlercache, decltype(&upb_handlercache_free)> ptr_;
4626 };
4627 
4628 #endif /* __cplusplus */
4629 
4630 /* upb_byteshandler ***********************************************************/
4631 
4632 typedef struct {
4634 
4635  /* It is wasteful to include the entire attributes here:
4636  *
4637  * * Some of the information is redundant (like storing the closure type
4638  * separately for each handler that must match).
4639  * * Some of the info is only needed prior to freeze() (like closure types).
4640  * * alignment padding wastes a lot of space for alwaysok_.
4641  *
4642  * If/when the size and locality of handlers is an issue, we can optimize this
4643  * not to store the entire attr like this. We do not expose the table's
4644  * layout to allow this optimization in the future. */
4647 
4648 #define UPB_TABENT_INIT {NULL, UPB_HANDLERATTR_INIT}
4649 
4650 typedef struct {
4653 
4654 #define UPB_BYTESHANDLER_INIT \
4655  { \
4656  { UPB_TABENT_INIT, UPB_TABENT_INIT, UPB_TABENT_INIT } \
4657  }
4658 
4661  *handler = init;
4662 }
4663 
4664 #ifdef __cplusplus
4665 extern "C" {
4666 #endif
4667 
4668 /* Caller must ensure that "d" outlives the handlers. */
4670  upb_startstr_handlerfunc *func, void *d);
4672  upb_string_handlerfunc *func, void *d);
4674  upb_endfield_handlerfunc *func, void *d);
4675 
4676 #ifdef __cplusplus
4677 } /* extern "C" */
4678 
4679 namespace upb {
4680 typedef upb_byteshandler BytesHandler;
4681 }
4682 #endif
4683 
4686 #ifdef __cplusplus
4687 extern "C" {
4688 #endif
4689 
4690 /* These are the handlers used internally by upb_msgfactory_getmergehandlers().
4691  * They write scalar data to a known offset from the message pointer.
4692  *
4693  * These would be trivial for anyone to implement themselves, but it's better
4694  * to use these because some JITs will recognize and specialize these instead
4695  * of actually calling the function. */
4696 
4697 /* Sets a handler for the given primitive field that will write the data at the
4698  * given offset. If hasbit > 0, also sets a hasbit at the given bit offset
4699  * (addressing each byte low to high). */
4701  const upb_fielddef *f,
4702  size_t offset,
4703  int32_t hasbit);
4704 
4705 /* If the given handler is a msghandlers_primitive field, returns true and sets
4706  * *type, *offset and *hasbit. Otherwise returns false. */
4708  upb_selector_t s,
4710  size_t *offset,
4711  int32_t *hasbit);
4712 
4713 
4714 
4715 #ifdef __cplusplus
4716 } /* extern "C" */
4717 #endif
4718 
4719 /*
4720 ** Inline definitions for handlers.h, which are particularly long and a bit
4721 ** tricky.
4722 */
4723 
4724 #ifndef UPB_HANDLERS_INL_H_
4725 #define UPB_HANDLERS_INL_H_
4726 
4727 #include <limits.h>
4728 #include <stddef.h>
4729 
4730 #ifdef __cplusplus
4731 
4732 /* Type detection and typedefs for integer types.
4733  * For platforms where there are multiple 32-bit or 64-bit types, we need to be
4734  * able to enumerate them so we can properly create overloads for all variants.
4735  *
4736  * If any platform existed where there were three integer types with the same
4737  * size, this would have to become more complicated. For example, short, int,
4738  * and long could all be 32-bits. Even more diabolically, short, int, long,
4739  * and long long could all be 64 bits and still be standard-compliant.
4740  * However, few platforms are this strange, and it's unlikely that upb will be
4741  * used on the strangest ones. */
4742 
4743 /* Can't count on stdint.h limits like INT32_MAX, because in C++ these are
4744  * only defined when __STDC_LIMIT_MACROS are defined before the *first* include
4745  * of stdint.h. We can't guarantee that someone else didn't include these first
4746  * without defining __STDC_LIMIT_MACROS. */
4747 #define UPB_INT32_MAX 0x7fffffffLL
4748 #define UPB_INT32_MIN (-UPB_INT32_MAX - 1)
4749 #define UPB_INT64_MAX 0x7fffffffffffffffLL
4750 #define UPB_INT64_MIN (-UPB_INT64_MAX - 1)
4751 
4752 #if INT_MAX == UPB_INT32_MAX && INT_MIN == UPB_INT32_MIN
4753 #define UPB_INT_IS_32BITS 1
4754 #endif
4755 
4756 #if LONG_MAX == UPB_INT32_MAX && LONG_MIN == UPB_INT32_MIN
4757 #define UPB_LONG_IS_32BITS 1
4758 #endif
4759 
4760 #if LONG_MAX == UPB_INT64_MAX && LONG_MIN == UPB_INT64_MIN
4761 #define UPB_LONG_IS_64BITS 1
4762 #endif
4763 
4764 #if LLONG_MAX == UPB_INT64_MAX && LLONG_MIN == UPB_INT64_MIN
4765 #define UPB_LLONG_IS_64BITS 1
4766 #endif
4767 
4768 /* We use macros instead of typedefs so we can undefine them later and avoid
4769  * leaking them outside this header file. */
4770 #if UPB_INT_IS_32BITS
4771 #define UPB_INT32_T int
4772 #define UPB_UINT32_T unsigned int
4773 
4774 #if UPB_LONG_IS_32BITS
4775 #define UPB_TWO_32BIT_TYPES 1
4776 #define UPB_INT32ALT_T long
4777 #define UPB_UINT32ALT_T unsigned long
4778 #endif /* UPB_LONG_IS_32BITS */
4779 
4780 #elif UPB_LONG_IS_32BITS /* && !UPB_INT_IS_32BITS */
4781 #define UPB_INT32_T long
4782 #define UPB_UINT32_T unsigned long
4783 #endif /* UPB_INT_IS_32BITS */
4784 
4785 
4786 #if UPB_LONG_IS_64BITS
4787 #define UPB_INT64_T long
4788 #define UPB_UINT64_T unsigned long
4789 
4790 #if UPB_LLONG_IS_64BITS
4791 #define UPB_TWO_64BIT_TYPES 1
4792 #define UPB_INT64ALT_T long long
4793 #define UPB_UINT64ALT_T unsigned long long
4794 #endif /* UPB_LLONG_IS_64BITS */
4795 
4796 #elif UPB_LLONG_IS_64BITS /* && !UPB_LONG_IS_64BITS */
4797 #define UPB_INT64_T long long
4798 #define UPB_UINT64_T unsigned long long
4799 #endif /* UPB_LONG_IS_64BITS */
4800 
4801 #undef UPB_INT32_MAX
4802 #undef UPB_INT32_MIN
4803 #undef UPB_INT64_MAX
4804 #undef UPB_INT64_MIN
4805 #undef UPB_INT_IS_32BITS
4806 #undef UPB_LONG_IS_32BITS
4807 #undef UPB_LONG_IS_64BITS
4808 #undef UPB_LLONG_IS_64BITS
4809 
4810 
4811 namespace upb {
4812 
4813 typedef void CleanupFunc(void *ptr);
4814 
4815 /* Template to remove "const" from "const T*" and just return "T*".
4816  *
4817  * We define a nonsense default because otherwise it will fail to instantiate as
4818  * a function parameter type even in cases where we don't expect any caller to
4819  * actually match the overload. */
4820 class CouldntRemoveConst {};
4821 template <class T> struct remove_constptr { typedef CouldntRemoveConst type; };
4822 template <class T> struct remove_constptr<const T *> { typedef T *type; };
4823 
4824 /* Template that we use below to remove a template specialization from
4825  * consideration if it matches a specific type. */
4826 template <class T, class U> struct disable_if_same { typedef void Type; };
4827 template <class T> struct disable_if_same<T, T> {};
4828 
4829 template <class T> void DeletePointer(void *p) { delete static_cast<T>(p); }
4830 
4831 template <class T1, class T2>
4832 struct FirstUnlessVoidOrBool {
4833  typedef T1 value;
4834 };
4835 
4836 template <class T2>
4837 struct FirstUnlessVoidOrBool<void, T2> {
4838  typedef T2 value;
4839 };
4840 
4841 template <class T2>
4842 struct FirstUnlessVoidOrBool<bool, T2> {
4843  typedef T2 value;
4844 };
4845 
4846 template<class T, class U>
4847 struct is_same {
4848  static bool value;
4849 };
4850 
4851 template<class T>
4852 struct is_same<T, T> {
4853  static bool value;
4854 };
4855 
4856 template<class T, class U>
4857 bool is_same<T, U>::value = false;
4858 
4859 template<class T>
4860 bool is_same<T, T>::value = true;
4861 
4862 /* FuncInfo *******************************************************************/
4863 
4864 /* Info about the user's original, pre-wrapped function. */
4865 template <class C, class R = void>
4866 struct FuncInfo {
4867  /* The type of the closure that the function takes (its first param). */
4868  typedef C Closure;
4869 
4870  /* The return type. */
4871  typedef R Return;
4872 };
4873 
4874 /* Func ***********************************************************************/
4875 
4876 /* Func1, Func2, Func3: Template classes representing a function and its
4877  * signature.
4878  *
4879  * Since the function is a template parameter, calling the function can be
4880  * inlined at compile-time and does not require a function pointer at runtime.
4881  * These functions are not bound to a handler data so have no data or cleanup
4882  * handler. */
4883 struct UnboundFunc {
4884  CleanupFunc *GetCleanup() { return nullptr; }
4885  void *GetData() { return nullptr; }
4886 };
4887 
4888 template <class R, class P1, R F(P1), class I>
4889 struct Func1 : public UnboundFunc {
4890  typedef R Return;
4891  typedef I FuncInfo;
4892  static R Call(P1 p1) { return F(p1); }
4893 };
4894 
4895 template <class R, class P1, class P2, R F(P1, P2), class I>
4896 struct Func2 : public UnboundFunc {
4897  typedef R Return;
4898  typedef I FuncInfo;
4899  static R Call(P1 p1, P2 p2) { return F(p1, p2); }
4900 };
4901 
4902 template <class R, class P1, class P2, class P3, R F(P1, P2, P3), class I>
4903 struct Func3 : public UnboundFunc {
4904  typedef R Return;
4905  typedef I FuncInfo;
4906  static R Call(P1 p1, P2 p2, P3 p3) { return F(p1, p2, p3); }
4907 };
4908 
4909 template <class R, class P1, class P2, class P3, class P4, R F(P1, P2, P3, P4),
4910  class I>
4911 struct Func4 : public UnboundFunc {
4912  typedef R Return;
4913  typedef I FuncInfo;
4914  static R Call(P1 p1, P2 p2, P3 p3, P4 p4) { return F(p1, p2, p3, p4); }
4915 };
4916 
4917 template <class R, class P1, class P2, class P3, class P4, class P5,
4918  R F(P1, P2, P3, P4, P5), class I>
4919 struct Func5 : public UnboundFunc {
4920  typedef R Return;
4921  typedef I FuncInfo;
4922  static R Call(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5) {
4923  return F(p1, p2, p3, p4, p5);
4924  }
4925 };
4926 
4927 /* BoundFunc ******************************************************************/
4928 
4929 /* BoundFunc2, BoundFunc3: Like Func2/Func3 except also contains a value that
4930  * shall be bound to the function's second parameter.
4931  *
4932  * Note that the second parameter is a const pointer, but our stored bound value
4933  * is non-const so we can free it when the handlers are destroyed. */
4934 template <class T>
4935 struct BoundFunc {
4936  typedef typename remove_constptr<T>::type MutableP2;
4937  explicit BoundFunc(MutableP2 data_) : data(data_) {}
4938  CleanupFunc *GetCleanup() { return &DeletePointer<MutableP2>; }
4939  MutableP2 GetData() { return data; }
4940  MutableP2 data;
4941 };
4942 
4943 template <class R, class P1, class P2, R F(P1, P2), class I>
4944 struct BoundFunc2 : public BoundFunc<P2> {
4945  typedef BoundFunc<P2> Base;
4946  typedef I FuncInfo;
4947  explicit BoundFunc2(typename Base::MutableP2 arg) : Base(arg) {}
4948 };
4949 
4950 template <class R, class P1, class P2, class P3, R F(P1, P2, P3), class I>
4951 struct BoundFunc3 : public BoundFunc<P2> {
4952  typedef BoundFunc<P2> Base;
4953  typedef I FuncInfo;
4954  explicit BoundFunc3(typename Base::MutableP2 arg) : Base(arg) {}
4955 };
4956 
4957 template <class R, class P1, class P2, class P3, class P4, R F(P1, P2, P3, P4),
4958  class I>
4959 struct BoundFunc4 : public BoundFunc<P2> {
4960  typedef BoundFunc<P2> Base;
4961  typedef I FuncInfo;
4962  explicit BoundFunc4(typename Base::MutableP2 arg) : Base(arg) {}
4963 };
4964 
4965 template <class R, class P1, class P2, class P3, class P4, class P5,
4966  R F(P1, P2, P3, P4, P5), class I>
4967 struct BoundFunc5 : public BoundFunc<P2> {
4968  typedef BoundFunc<P2> Base;
4969  typedef I FuncInfo;
4970  explicit BoundFunc5(typename Base::MutableP2 arg) : Base(arg) {}
4971 };
4972 
4973 /* FuncSig ********************************************************************/
4974 
4975 /* FuncSig1, FuncSig2, FuncSig3: template classes reflecting a function
4976  * *signature*, but without a specific function attached.
4977  *
4978  * These classes contain member functions that can be invoked with a
4979  * specific function to return a Func/BoundFunc class. */
4980 template <class R, class P1>
4981 struct FuncSig1 {
4982  template <R F(P1)>
4983  Func1<R, P1, F, FuncInfo<P1, R> > GetFunc() {
4984  return Func1<R, P1, F, FuncInfo<P1, R> >();
4985  }
4986 };
4987 
4988 template <class R, class P1, class P2>
4989 struct FuncSig2 {
4990  template <R F(P1, P2)>
4991  Func2<R, P1, P2, F, FuncInfo<P1, R> > GetFunc() {
4992  return Func2<R, P1, P2, F, FuncInfo<P1, R> >();
4993  }
4994 
4995  template <R F(P1, P2)>
4996  BoundFunc2<R, P1, P2, F, FuncInfo<P1, R> > GetFunc(
4997  typename remove_constptr<P2>::type param2) {
4998  return BoundFunc2<R, P1, P2, F, FuncInfo<P1, R> >(param2);
4999  }
5000 };
5001 
5002 template <class R, class P1, class P2, class P3>
5003 struct FuncSig3 {
5004  template <R F(P1, P2, P3)>
5005  Func3<R, P1, P2, P3, F, FuncInfo<P1, R> > GetFunc() {
5006  return Func3<R, P1, P2, P3, F, FuncInfo<P1, R> >();
5007  }
5008 
5009  template <R F(P1, P2, P3)>
5010  BoundFunc3<R, P1, P2, P3, F, FuncInfo<P1, R> > GetFunc(
5011  typename remove_constptr<P2>::type param2) {
5012  return BoundFunc3<R, P1, P2, P3, F, FuncInfo<P1, R> >(param2);
5013  }
5014 };
5015 
5016 template <class R, class P1, class P2, class P3, class P4>
5017 struct FuncSig4 {
5018  template <R F(P1, P2, P3, P4)>
5019  Func4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> > GetFunc() {
5020  return Func4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> >();
5021  }
5022 
5023  template <R F(P1, P2, P3, P4)>
5024  BoundFunc4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> > GetFunc(
5025  typename remove_constptr<P2>::type param2) {
5026  return BoundFunc4<R, P1, P2, P3, P4, F, FuncInfo<P1, R> >(param2);
5027  }
5028 };
5029 
5030 template <class R, class P1, class P2, class P3, class P4, class P5>
5031 struct FuncSig5 {
5032  template <R F(P1, P2, P3, P4, P5)>
5033  Func5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> > GetFunc() {
5034  return Func5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> >();
5035  }
5036 
5037  template <R F(P1, P2, P3, P4, P5)>
5038  BoundFunc5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> > GetFunc(
5039  typename remove_constptr<P2>::type param2) {
5040  return BoundFunc5<R, P1, P2, P3, P4, P5, F, FuncInfo<P1, R> >(param2);
5041  }
5042 };
5043 
5044 /* Overloaded template function that can construct the appropriate FuncSig*
5045  * class given a function pointer by deducing the template parameters. */
5046 template <class R, class P1>
5047 inline FuncSig1<R, P1> MatchFunc(R (*f)(P1)) {
5048  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5049  return FuncSig1<R, P1>();
5050 }
5051 
5052 template <class R, class P1, class P2>
5053 inline FuncSig2<R, P1, P2> MatchFunc(R (*f)(P1, P2)) {
5054  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5055  return FuncSig2<R, P1, P2>();
5056 }
5057 
5058 template <class R, class P1, class P2, class P3>
5059 inline FuncSig3<R, P1, P2, P3> MatchFunc(R (*f)(P1, P2, P3)) {
5060  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5061  return FuncSig3<R, P1, P2, P3>();
5062 }
5063 
5064 template <class R, class P1, class P2, class P3, class P4>
5065 inline FuncSig4<R, P1, P2, P3, P4> MatchFunc(R (*f)(P1, P2, P3, P4)) {
5066  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5067  return FuncSig4<R, P1, P2, P3, P4>();
5068 }
5069 
5070 template <class R, class P1, class P2, class P3, class P4, class P5>
5071 inline FuncSig5<R, P1, P2, P3, P4, P5> MatchFunc(R (*f)(P1, P2, P3, P4, P5)) {
5072  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5073  return FuncSig5<R, P1, P2, P3, P4, P5>();
5074 }
5075 
5076 /* MethodSig ******************************************************************/
5077 
5078 /* CallMethod*: a function template that calls a given method. */
5079 template <class R, class C, R (C::*F)()>
5080 R CallMethod0(C *obj) {
5081  return ((*obj).*F)();
5082 }
5083 
5084 template <class R, class C, class P1, R (C::*F)(P1)>
5085 R CallMethod1(C *obj, P1 arg1) {
5086  return ((*obj).*F)(arg1);
5087 }
5088 
5089 template <class R, class C, class P1, class P2, R (C::*F)(P1, P2)>
5090 R CallMethod2(C *obj, P1 arg1, P2 arg2) {
5091  return ((*obj).*F)(arg1, arg2);
5092 }
5093 
5094 template <class R, class C, class P1, class P2, class P3, R (C::*F)(P1, P2, P3)>
5095 R CallMethod3(C *obj, P1 arg1, P2 arg2, P3 arg3) {
5096  return ((*obj).*F)(arg1, arg2, arg3);
5097 }
5098 
5099 template <class R, class C, class P1, class P2, class P3, class P4,
5100  R (C::*F)(P1, P2, P3, P4)>
5101 R CallMethod4(C *obj, P1 arg1, P2 arg2, P3 arg3, P4 arg4) {
5102  return ((*obj).*F)(arg1, arg2, arg3, arg4);
5103 }
5104 
5105 /* MethodSig: like FuncSig, but for member functions.
5106  *
5107  * GetFunc() returns a normal FuncN object, so after calling GetFunc() no
5108  * more logic is required to special-case methods. */
5109 template <class R, class C>
5110 struct MethodSig0 {
5111  template <R (C::*F)()>
5112  Func1<R, C *, CallMethod0<R, C, F>, FuncInfo<C *, R> > GetFunc() {
5113  return Func1<R, C *, CallMethod0<R, C, F>, FuncInfo<C *, R> >();
5114  }
5115 };
5116 
5117 template <class R, class C, class P1>
5118 struct MethodSig1 {
5119  template <R (C::*F)(P1)>
5120  Func2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> > GetFunc() {
5121  return Func2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> >();
5122  }
5123 
5124  template <R (C::*F)(P1)>
5125  BoundFunc2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> > GetFunc(
5126  typename remove_constptr<P1>::type param1) {
5127  return BoundFunc2<R, C *, P1, CallMethod1<R, C, P1, F>, FuncInfo<C *, R> >(
5128  param1);
5129  }
5130 };
5131 
5132 template <class R, class C, class P1, class P2>
5133 struct MethodSig2 {
5134  template <R (C::*F)(P1, P2)>
5135  Func3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>, FuncInfo<C *, R> >
5136  GetFunc() {
5137  return Func3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>,
5138  FuncInfo<C *, R> >();
5139  }
5140 
5141  template <R (C::*F)(P1, P2)>
5142  BoundFunc3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>, FuncInfo<C *, R> >
5143  GetFunc(typename remove_constptr<P1>::type param1) {
5144  return BoundFunc3<R, C *, P1, P2, CallMethod2<R, C, P1, P2, F>,
5145  FuncInfo<C *, R> >(param1);
5146  }
5147 };
5148 
5149 template <class R, class C, class P1, class P2, class P3>
5150 struct MethodSig3 {
5151  template <R (C::*F)(P1, P2, P3)>
5152  Func4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>, FuncInfo<C *, R> >
5153  GetFunc() {
5154  return Func4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>,
5155  FuncInfo<C *, R> >();
5156  }
5157 
5158  template <R (C::*F)(P1, P2, P3)>
5159  BoundFunc4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>,
5160  FuncInfo<C *, R> >
5161  GetFunc(typename remove_constptr<P1>::type param1) {
5162  return BoundFunc4<R, C *, P1, P2, P3, CallMethod3<R, C, P1, P2, P3, F>,
5163  FuncInfo<C *, R> >(param1);
5164  }
5165 };
5166 
5167 template <class R, class C, class P1, class P2, class P3, class P4>
5168 struct MethodSig4 {
5169  template <R (C::*F)(P1, P2, P3, P4)>
5170  Func5<R, C *, P1, P2, P3, P4, CallMethod4<R, C, P1, P2, P3, P4, F>,
5171  FuncInfo<C *, R> >
5172  GetFunc() {
5173  return Func5<R, C *, P1, P2, P3, P4, CallMethod4<R, C, P1, P2, P3, P4, F>,
5174  FuncInfo<C *, R> >();
5175  }
5176 
5177  template <R (C::*F)(P1, P2, P3, P4)>
5178  BoundFunc5<R, C *, P1, P2, P3, P4, CallMethod4<R, C, P1, P2, P3, P4, F>,
5179  FuncInfo<C *, R> >
5180  GetFunc(typename remove_constptr<P1>::type param1) {
5181  return BoundFunc5<R, C *, P1, P2, P3, P4,
5182  CallMethod4<R, C, P1, P2, P3, P4, F>, FuncInfo<C *, R> >(
5183  param1);
5184  }
5185 };
5186 
5187 template <class R, class C>
5188 inline MethodSig0<R, C> MatchFunc(R (C::*f)()) {
5189  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5190  return MethodSig0<R, C>();
5191 }
5192 
5193 template <class R, class C, class P1>
5194 inline MethodSig1<R, C, P1> MatchFunc(R (C::*f)(P1)) {
5195  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5196  return MethodSig1<R, C, P1>();
5197 }
5198 
5199 template <class R, class C, class P1, class P2>
5200 inline MethodSig2<R, C, P1, P2> MatchFunc(R (C::*f)(P1, P2)) {
5201  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5202  return MethodSig2<R, C, P1, P2>();
5203 }
5204 
5205 template <class R, class C, class P1, class P2, class P3>
5206 inline MethodSig3<R, C, P1, P2, P3> MatchFunc(R (C::*f)(P1, P2, P3)) {
5207  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5208  return MethodSig3<R, C, P1, P2, P3>();
5209 }
5210 
5211 template <class R, class C, class P1, class P2, class P3, class P4>
5212 inline MethodSig4<R, C, P1, P2, P3, P4> MatchFunc(R (C::*f)(P1, P2, P3, P4)) {
5213  UPB_UNUSED(f); /* Only used for template parameter deduction. */
5214  return MethodSig4<R, C, P1, P2, P3, P4>();
5215 }
5216 
5217 /* MaybeWrapReturn ************************************************************/
5218 
5219 /* Template class that attempts to wrap the return value of the function so it
5220  * matches the expected type. There are two main adjustments it may make:
5221  *
5222  * 1. If the function returns void, make it return the expected type and with
5223  * a value that always indicates success.
5224  * 2. If the function returns bool, make it return the expected type with a
5225  * value that indicates success or failure.
5226  *
5227  * The "expected type" for return is:
5228  * 1. void* for start handlers. If the closure parameter has a different type
5229  * we will cast it to void* for the return in the success case.
5230  * 2. size_t for string buffer handlers.
5231  * 3. bool for everything else. */
5232 
5233 /* Template parameters are FuncN type and desired return type. */
5234 template <class F, class R, class Enable = void>
5235 struct MaybeWrapReturn;
5236 
5237 /* If the return type matches, return the given function unwrapped. */
5238 template <class F>
5239 struct MaybeWrapReturn<F, typename F::Return> {
5240  typedef F Func;
5241 };
5242 
5243 /* Function wrapper that munges the return value from void to (bool)true. */
5244 template <class P1, class P2, void F(P1, P2)>
5245 bool ReturnTrue2(P1 p1, P2 p2) {
5246  F(p1, p2);
5247  return true;
5248 }
5249 
5250 template <class P1, class P2, class P3, void F(P1, P2, P3)>
5251 bool ReturnTrue3(P1 p1, P2 p2, P3 p3) {
5252  F(p1, p2, p3);
5253  return true;
5254 }
5255 
5256 /* Function wrapper that munges the return value from void to (void*)arg1 */
5257 template <class P1, class P2, void F(P1, P2)>
5258 void *ReturnClosure2(P1 p1, P2 p2) {
5259  F(p1, p2);
5260  return p1;
5261 }
5262 
5263 template <class P1, class P2, class P3, void F(P1, P2, P3)>
5264 void *ReturnClosure3(P1 p1, P2 p2, P3 p3) {
5265  F(p1, p2, p3);
5266  return p1;
5267 }
5268 
5269 /* Function wrapper that munges the return value from R to void*. */
5270 template <class R, class P1, class P2, R F(P1, P2)>
5271 void *CastReturnToVoidPtr2(P1 p1, P2 p2) {
5272  return F(p1, p2);
5273 }
5274 
5275 template <class R, class P1, class P2, class P3, R F(P1, P2, P3)>
5276 void *CastReturnToVoidPtr3(P1 p1, P2 p2, P3 p3) {
5277  return F(p1, p2, p3);
5278 }
5279 
5280 /* Function wrapper that munges the return value from bool to void*. */
5281 template <class P1, class P2, bool F(P1, P2)>
5282 void *ReturnClosureOrBreak2(P1 p1, P2 p2) {
5283  return F(p1, p2) ? p1 : UPB_BREAK;
5284 }
5285 
5286 template <class P1, class P2, class P3, bool F(P1, P2, P3)>
5287 void *ReturnClosureOrBreak3(P1 p1, P2 p2, P3 p3) {
5288  return F(p1, p2, p3) ? p1 : UPB_BREAK;
5289 }
5290 
5291 /* For the string callback, which takes five params, returns the size param. */
5292 template <class P1, class P2,
5293  void F(P1, P2, const char *, size_t, const upb_bufhandle *)>
5294 size_t ReturnStringLen(P1 p1, P2 p2, const char *p3, size_t p4,
5295  const upb_bufhandle *p5) {
5296  F(p1, p2, p3, p4, p5);
5297  return p4;
5298 }
5299 
5300 /* For the string callback, which takes five params, returns the size param or
5301  * zero. */
5302 template <class P1, class P2,
5303  bool F(P1, P2, const char *, size_t, const upb_bufhandle *)>
5304 size_t ReturnNOr0(P1 p1, P2 p2, const char *p3, size_t p4,
5305  const upb_bufhandle *p5) {
5306  return F(p1, p2, p3, p4, p5) ? p4 : 0;
5307 }
5308 
5309 /* If we have a function returning void but want a function returning bool, wrap
5310  * it in a function that returns true. */
5311 template <class P1, class P2, void F(P1, P2), class I>
5312 struct MaybeWrapReturn<Func2<void, P1, P2, F, I>, bool> {
5313  typedef Func2<bool, P1, P2, ReturnTrue2<P1, P2, F>, I> Func;
5314 };
5315 
5316 template <class P1, class P2, class P3, void F(P1, P2, P3), class I>
5317 struct MaybeWrapReturn<Func3<void, P1, P2, P3, F, I>, bool> {
5318  typedef Func3<bool, P1, P2, P3, ReturnTrue3<P1, P2, P3, F>, I> Func;
5319 };
5320 
5321 /* If our function returns void but we want one returning void*, wrap it in a
5322  * function that returns the first argument. */
5323 template <class P1, class P2, void F(P1, P2), class I>
5324 struct MaybeWrapReturn<Func2<void, P1, P2, F, I>, void *> {
5325  typedef Func2<void *, P1, P2, ReturnClosure2<P1, P2, F>, I> Func;
5326 };
5327 
5328 template <class P1, class P2, class P3, void F(P1, P2, P3), class I>
5329 struct MaybeWrapReturn<Func3<void, P1, P2, P3, F, I>, void *> {
5330  typedef Func3<void *, P1, P2, P3, ReturnClosure3<P1, P2, P3, F>, I> Func;
5331 };
5332 
5333 /* If our function returns R* but we want one returning void*, wrap it in a
5334  * function that casts to void*. */
5335 template <class R, class P1, class P2, R *F(P1, P2), class I>
5336 struct MaybeWrapReturn<Func2<R *, P1, P2, F, I>, void *,
5338  typedef Func2<void *, P1, P2, CastReturnToVoidPtr2<R *, P1, P2, F>, I> Func;
5339 };
5340 
5341 template <class R, class P1, class P2, class P3, R *F(P1, P2, P3), class I>
5342 struct MaybeWrapReturn<Func3<R *, P1, P2, P3, F, I>, void *,
5344  typedef Func3<void *, P1, P2, P3, CastReturnToVoidPtr3<R *, P1, P2, P3, F>, I>
5345  Func;
5346 };
5347 
5348 /* If our function returns bool but we want one returning void*, wrap it in a
5349  * function that returns either the first param or UPB_BREAK. */
5350 template <class P1, class P2, bool F(P1, P2), class I>
5351 struct MaybeWrapReturn<Func2<bool, P1, P2, F, I>, void *> {
5352  typedef Func2<void *, P1, P2, ReturnClosureOrBreak2<P1, P2, F>, I> Func;
5353 };
5354 
5355 template <class P1, class P2, class P3, bool F(P1, P2, P3), class I>
5356 struct MaybeWrapReturn<Func3<bool, P1, P2, P3, F, I>, void *> {
5357  typedef Func3<void *, P1, P2, P3, ReturnClosureOrBreak3<P1, P2, P3, F>, I>
5358  Func;
5359 };
5360 
5361 /* If our function returns void but we want one returning size_t, wrap it in a
5362  * function that returns the size argument. */
5363 template <class P1, class P2,
5364  void F(P1, P2, const char *, size_t, const upb_bufhandle *), class I>
5365 struct MaybeWrapReturn<
5366  Func5<void, P1, P2, const char *, size_t, const upb_bufhandle *, F, I>,
5367  size_t> {
5368  typedef Func5<size_t, P1, P2, const char *, size_t, const upb_bufhandle *,
5369  ReturnStringLen<P1, P2, F>, I> Func;
5370 };
5371 
5372 /* If our function returns bool but we want one returning size_t, wrap it in a
5373  * function that returns either 0 or the buf size. */
5374 template <class P1, class P2,
5375  bool F(P1, P2, const char *, size_t, const upb_bufhandle *), class I>
5376 struct MaybeWrapReturn<
5377  Func5<bool, P1, P2, const char *, size_t, const upb_bufhandle *, F, I>,
5378  size_t> {
5379  typedef Func5<size_t, P1, P2, const char *, size_t, const upb_bufhandle *,
5380  ReturnNOr0<P1, P2, F>, I> Func;
5381 };
5382 
5383 /* ConvertParams **************************************************************/
5384 
5385 /* Template class that converts the function parameters if necessary, and
5386  * ignores the HandlerData parameter if appropriate.
5387  *
5388  * Template parameter is the are FuncN function type. */
5389 template <class F, class T>
5390 struct ConvertParams;
5391 
5392 /* Function that discards the handler data parameter. */
5393 template <class R, class P1, R F(P1)>
5394 R IgnoreHandlerData2(void *p1, const void *hd) {
5395  UPB_UNUSED(hd);
5396  return F(static_cast<P1>(p1));
5397 }
5398 
5399 template <class R, class P1, class P2Wrapper, class P2Wrapped,
5400  R F(P1, P2Wrapped)>
5401 R IgnoreHandlerData3(void *p1, const void *hd, P2Wrapper p2) {
5402  UPB_UNUSED(hd);
5403  return F(static_cast<P1>(p1), p2);
5404 }
5405 
5406 template <class R, class P1, class P2, class P3, R F(P1, P2, P3)>
5407 R IgnoreHandlerData4(void *p1, const void *hd, P2 p2, P3 p3) {
5408  UPB_UNUSED(hd);
5409  return F(static_cast<P1>(p1), p2, p3);
5410 }
5411 
5412 template <class R, class P1, class P2, class P3, class P4, R F(P1, P2, P3, P4)>
5413 R IgnoreHandlerData5(void *p1, const void *hd, P2 p2, P3 p3, P4 p4) {
5414  UPB_UNUSED(hd);
5415  return F(static_cast<P1>(p1), p2, p3, p4);
5416 }
5417 
5418 template <class R, class P1, R F(P1, const char*, size_t)>
5419 R IgnoreHandlerDataIgnoreHandle(void *p1, const void *hd, const char *p2,
5420  size_t p3, const upb_bufhandle *handle) {
5421  UPB_UNUSED(hd);
5422  UPB_UNUSED(handle);
5423  return F(static_cast<P1>(p1), p2, p3);
5424 }
5425 
5426 /* Function that casts the handler data parameter. */
5427 template <class R, class P1, class P2, R F(P1, P2)>
5428 R CastHandlerData2(void *c, const void *hd) {
5429  return F(static_cast<P1>(c), static_cast<P2>(hd));
5430 }
5431 
5432 template <class R, class P1, class P2, class P3Wrapper, class P3Wrapped,
5433  R F(P1, P2, P3Wrapped)>
5434 R CastHandlerData3(void *c, const void *hd, P3Wrapper p3) {
5435  return F(static_cast<P1>(c), static_cast<P2>(hd), p3);
5436 }
5437 
5438 template <class R, class P1, class P2, class P3, class P4, class P5,
5439  R F(P1, P2, P3, P4, P5)>
5440 R CastHandlerData5(void *c, const void *hd, P3 p3, P4 p4, P5 p5) {
5441  return F(static_cast<P1>(c), static_cast<P2>(hd), p3, p4, p5);
5442 }
5443 
5444 template <class R, class P1, class P2, R F(P1, P2, const char *, size_t)>
5445 R CastHandlerDataIgnoreHandle(void *c, const void *hd, const char *p3,
5446  size_t p4, const upb_bufhandle *handle) {
5447  UPB_UNUSED(handle);
5448  return F(static_cast<P1>(c), static_cast<P2>(hd), p3, p4);
5449 }
5450 
5451 /* For unbound functions, ignore the handler data. */
5452 template <class R, class P1, R F(P1), class I, class T>
5453 struct ConvertParams<Func1<R, P1, F, I>, T> {
5454  typedef Func2<R, void *, const void *, IgnoreHandlerData2<R, P1, F>, I> Func;
5455 };
5456 
5457 template <class R, class P1, class P2, R F(P1, P2), class I,
5458  class R2, class P1_2, class P2_2, class P3_2>
5459 struct ConvertParams<Func2<R, P1, P2, F, I>,
5460  R2 (*)(P1_2, P2_2, P3_2)> {
5461  typedef Func3<R, void *, const void *, P3_2,
5462  IgnoreHandlerData3<R, P1, P3_2, P2, F>, I> Func;
5463 };
5464 
5465 /* For StringBuffer only; this ignores both the handler data and the
5466  * upb_bufhandle. */
5467 template <class R, class P1, R F(P1, const char *, size_t), class I, class T>
5468 struct ConvertParams<Func3<R, P1, const char *, size_t, F, I>, T> {
5469  typedef Func5<R, void *, const void *, const char *, size_t,
5470  const upb_bufhandle *, IgnoreHandlerDataIgnoreHandle<R, P1, F>,
5471  I> Func;
5472 };
5473 
5474 template <class R, class P1, class P2, class P3, class P4, R F(P1, P2, P3, P4),
5475  class I, class T>
5476 struct ConvertParams<Func4<R, P1, P2, P3, P4, F, I>, T> {
5477  typedef Func5<R, void *, const void *, P2, P3, P4,
5478  IgnoreHandlerData5<R, P1, P2, P3, P4, F>, I> Func;
5479 };
5480 
5481 /* For bound functions, cast the handler data. */
5482 template <class R, class P1, class P2, R F(P1, P2), class I, class T>
5483 struct ConvertParams<BoundFunc2<R, P1, P2, F, I>, T> {
5484  typedef Func2<R, void *, const void *, CastHandlerData2<R, P1, P2, F>, I>
5485  Func;
5486 };
5487 
5488 template <class R, class P1, class P2, class P3, R F(P1, P2, P3), class I,
5489  class R2, class P1_2, class P2_2, class P3_2>
5490 struct ConvertParams<BoundFunc3<R, P1, P2, P3, F, I>,
5491  R2 (*)(P1_2, P2_2, P3_2)> {
5492  typedef Func3<R, void *, const void *, P3_2,
5493  CastHandlerData3<R, P1, P2, P3_2, P3, F>, I> Func;
5494 };
5495 
5496 /* For StringBuffer only; this ignores the upb_bufhandle. */
5497 template <class R, class P1, class P2, R F(P1, P2, const char *, size_t),
5498  class I, class T>
5499 struct ConvertParams<BoundFunc4<R, P1, P2, const char *, size_t, F, I>, T> {
5500  typedef Func5<R, void *, const void *, const char *, size_t,
5501  const upb_bufhandle *,
5502  CastHandlerDataIgnoreHandle<R, P1, P2, F>, I>
5503  Func;
5504 };
5505 
5506 template <class R, class P1, class P2, class P3, class P4, class P5,
5507  R F(P1, P2, P3, P4, P5), class I, class T>
5508 struct ConvertParams<BoundFunc5<R, P1, P2, P3, P4, P5, F, I>, T> {
5509  typedef Func5<R, void *, const void *, P3, P4, P5,
5510  CastHandlerData5<R, P1, P2, P3, P4, P5, F>, I> Func;
5511 };
5512 
5513 /* utype/ltype are upper/lower-case, ctype is canonical C type, vtype is
5514  * variant C type. */
5515 #define TYPE_METHODS(utype, ltype, ctype, vtype) \
5516  template <> \
5517  struct CanonicalType<vtype> { \
5518  typedef ctype Type; \
5519  }; \
5520  template <> \
5521  inline bool HandlersPtr::SetValueHandler<vtype>( \
5522  FieldDefPtr f, const HandlersPtr::utype##Handler &handler) { \
5523  handler.AddCleanup(ptr()); \
5524  return upb_handlers_set##ltype(ptr(), f.ptr(), handler.handler(), \
5525  &handler.attr()); \
5526  }
5527 
5528 TYPE_METHODS(Double, double, double, double)
5529 TYPE_METHODS(Float, float, float, float)
5530 TYPE_METHODS(UInt64, uint64, uint64_t, UPB_UINT64_T)
5531 TYPE_METHODS(UInt32, uint32, uint32_t, UPB_UINT32_T)
5532 TYPE_METHODS(Int64, int64, int64_t, UPB_INT64_T)
5533 TYPE_METHODS(Int32, int32, int32_t, UPB_INT32_T)
5534 TYPE_METHODS(Bool, bool, bool, bool)
5535 
5536 #ifdef UPB_TWO_32BIT_TYPES
5537 TYPE_METHODS(Int32, int32, int32_t, UPB_INT32ALT_T)
5538 TYPE_METHODS(UInt32, uint32, uint32_t, UPB_UINT32ALT_T)
5539 #endif
5540 
5541 #ifdef UPB_TWO_64BIT_TYPES
5542 TYPE_METHODS(Int64, int64, int64_t, UPB_INT64ALT_T)
5543 TYPE_METHODS(UInt64, uint64, uint64_t, UPB_UINT64ALT_T)
5544 #endif
5545 #undef TYPE_METHODS
5546 
5547 template <> struct CanonicalType<Status*> {
5548  typedef Status* Type;
5549 };
5550 
5551 template <class F> struct ReturnOf;
5552 
5553 template <class R, class P1, class P2>
5554 struct ReturnOf<R (*)(P1, P2)> {
5555  typedef R Return;
5556 };
5557 
5558 template <class R, class P1, class P2, class P3>
5559 struct ReturnOf<R (*)(P1, P2, P3)> {
5560  typedef R Return;
5561 };
5562 
5563 template <class R, class P1, class P2, class P3, class P4>
5564 struct ReturnOf<R (*)(P1, P2, P3, P4)> {
5565  typedef R Return;
5566 };
5567 
5568 template <class R, class P1, class P2, class P3, class P4, class P5>
5569 struct ReturnOf<R (*)(P1, P2, P3, P4, P5)> {
5570  typedef R Return;
5571 };
5572 
5573 
5574 template <class T>
5575 template <class F>
5576 inline Handler<T>::Handler(F func)
5577  : registered_(false),
5578  cleanup_data_(func.GetData()),
5579  cleanup_func_(func.GetCleanup()) {
5580  attr_.handler_data = func.GetData();
5581  typedef typename ReturnOf<T>::Return Return;
5582  typedef typename ConvertParams<F, T>::Func ConvertedParamsFunc;
5584  ReturnWrappedFunc;
5585  handler_ = ReturnWrappedFunc().Call;
5586 
5587  /* Set attributes based on what templates can statically tell us about the
5588  * user's function. */
5589 
5590  /* If the original function returns void, then we know that we wrapped it to
5591  * always return ok. */
5593  attr_.alwaysok = always_ok;
5594 
5595  /* Closure parameter and return type. */
5596  attr_.closure_type = UniquePtrForType<typename F::FuncInfo::Closure>();
5597 
5598  /* We use the closure type (from the first parameter) if the return type is
5599  * void or bool, since these are the two cases we wrap to return the closure's
5600  * type anyway.
5601  *
5602  * This is all nonsense for non START* handlers, but it doesn't matter because
5603  * in that case the value will be ignored. */
5604  typedef typename FirstUnlessVoidOrBool<typename F::FuncInfo::Return,
5605  typename F::FuncInfo::Closure>::value
5606  EffectiveReturn;
5607  attr_.return_closure_type = UniquePtrForType<EffectiveReturn>();
5608 }
5609 
5610 template <class T>
5611 inline void Handler<T>::AddCleanup(upb_handlers* h) const {
5612  UPB_ASSERT(!registered_);
5613  registered_ = true;
5614  if (cleanup_func_) {
5615  bool ok = upb_handlers_addcleanup(h, cleanup_data_, cleanup_func_);
5616  UPB_ASSERT(ok);
5617  }
5618 }
5619 
5620 } /* namespace upb */
5621 
5622 #endif /* __cplusplus */
5623 
5624 
5625 #undef UPB_TWO_32BIT_TYPES
5626 #undef UPB_TWO_64BIT_TYPES
5627 #undef UPB_INT32_T
5628 #undef UPB_UINT32_T
5629 #undef UPB_INT32ALT_T
5630 #undef UPB_UINT32ALT_T
5631 #undef UPB_INT64_T
5632 #undef UPB_UINT64_T
5633 #undef UPB_INT64ALT_T
5634 #undef UPB_UINT64ALT_T
5635 
5636 #endif /* UPB_HANDLERS_INL_H_ */
5637 
5638 #endif /* UPB_HANDLERS_H */
5639 /*
5640 ** upb::Sink (upb_sink)
5641 ** upb::BytesSink (upb_bytessink)
5642 **
5643 ** A upb_sink is an object that binds a upb_handlers object to some runtime
5644 ** state. It is the object that can actually receive data via the upb_handlers
5645 ** interface.
5646 **
5647 ** Unlike upb_def and upb_handlers, upb_sink is never frozen, immutable, or
5648 ** thread-safe. You can create as many of them as you want, but each one may
5649 ** only be used in a single thread at a time.
5650 **
5651 ** If we compare with class-based OOP, a you can think of a upb_def as an
5652 ** abstract base class, a upb_handlers as a concrete derived class, and a
5653 ** upb_sink as an object (class instance).
5654 */
5655 
5656 #ifndef UPB_SINK_H
5657 #define UPB_SINK_H
5658 
5659 
5660 #ifdef __cplusplus
5661 namespace upb {
5662 class BytesSink;
5663 class Sink;
5664 }
5665 #endif
5666 
5667 /* upb_sink *******************************************************************/
5668 
5669 #ifdef __cplusplus
5670 extern "C" {
5671 #endif
5672 
5673 typedef struct {
5675  void *closure;
5676 } upb_sink;
5677 
5678 #define PUTVAL(type, ctype) \
5679  UPB_INLINE bool upb_sink_put##type(upb_sink s, upb_selector_t sel, \
5680  ctype val) { \
5681  typedef upb_##type##_handlerfunc functype; \
5682  functype *func; \
5683  const void *hd; \
5684  if (!s.handlers) return true; \
5685  func = (functype *)upb_handlers_gethandler(s.handlers, sel, &hd); \
5686  if (!func) return true; \
5687  return func(s.closure, hd, val); \
5688  }
5689 
5690 PUTVAL(int32, int32_t)
5691 PUTVAL(int64, int64_t)
5692 PUTVAL(uint32, uint32_t)
5693 PUTVAL(uint64, uint64_t)
5694 PUTVAL(float, float)
5695 PUTVAL(double, double)
5696 PUTVAL(bool, bool)
5697 #undef PUTVAL
5698 
5699 UPB_INLINE void upb_sink_reset(upb_sink *s, const upb_handlers *h, void *c) {
5700  s->handlers = h;
5701  s->closure = c;
5702 }
5703 
5705  const char *buf, size_t n,
5706  const upb_bufhandle *handle) {
5707  typedef upb_string_handlerfunc func;
5708  func *handler;
5709  const void *hd;
5710  if (!s.handlers) return n;
5711  handler = (func *)upb_handlers_gethandler(s.handlers, sel, &hd);
5712 
5713  if (!handler) return n;
5714  return handler(s.closure, hd, buf, n, handle);
5715 }
5716 
5717 UPB_INLINE bool upb_sink_putunknown(upb_sink s, const char *buf, size_t n) {
5718  typedef upb_unknown_handlerfunc func;
5719  func *handler;
5720  const void *hd;
5721  if (!s.handlers) return true;
5722  handler =
5724 
5725  if (!handler) return n;
5726  return handler(s.closure, hd, buf, n);
5727 }
5728 
5731  func *startmsg;
5732  const void *hd;
5733  if (!s.handlers) return true;
5734  startmsg =
5736 
5737  if (!startmsg) return true;
5738  return startmsg(s.closure, hd);
5739 }
5740 
5742  typedef upb_endmsg_handlerfunc func;
5743  func *endmsg;
5744  const void *hd;
5745  if (!s.handlers) return true;
5746  endmsg =
5748 
5749  if (!endmsg) return true;
5750  return endmsg(s.closure, hd, status);
5751 }
5752 
5754  upb_sink *sub) {
5756  func *startseq;
5757  const void *hd;
5758  sub->closure = s.closure;
5759  sub->handlers = s.handlers;
5760  if (!s.handlers) return true;
5761  startseq = (func*)upb_handlers_gethandler(s.handlers, sel, &hd);
5762 
5763  if (!startseq) return true;
5764  sub->closure = startseq(s.closure, hd);
5765  return sub->closure ? true : false;
5766 }
5767 
5770  func *endseq;
5771  const void *hd;
5772  if (!s.handlers) return true;
5773  endseq = (func*)upb_handlers_gethandler(s.handlers, sel, &hd);
5774 
5775  if (!endseq) return true;
5776  return endseq(s.closure, hd);
5777 }
5778 
5780  size_t size_hint, upb_sink *sub) {
5782  func *startstr;
5783  const void *hd;
5784  sub->closure = s.closure;
5785  sub->handlers = s.handlers;
5786  if (!s.handlers) return true;
5787  startstr = (func*)upb_handlers_gethandler(s.handlers, sel, &hd);
5788 
5789  if (!startstr) return true;
5790  sub->closure = startstr(s.closure, hd, size_hint);
5791  return sub->closure ? true : false;
5792 }
5793 
5796  func *endstr;
5797  const void *hd;
5798  if (!s.handlers) return true;
5799  endstr = (func*)upb_handlers_gethandler(s.handlers, sel, &hd);
5800 
5801  if (!endstr) return true;
5802  return endstr(s.closure, hd);
5803 }
5804 
5806  upb_sink *sub) {
5808  func *startsubmsg;
5809  const void *hd;
5810  sub->closure = s.closure;
5811  if (!s.handlers) {
5812  sub->handlers = NULL;
5813  return true;
5814  }
5815  sub->handlers = upb_handlers_getsubhandlers_sel(s.handlers, sel);
5816  startsubmsg = (func*)upb_handlers_gethandler(s.handlers, sel, &hd);
5817 
5818  if (!startsubmsg) return true;
5819  sub->closure = startsubmsg(s.closure, hd);
5820  return sub->closure ? true : false;
5821 }
5822 
5825  func *endsubmsg;
5826  const void *hd;
5827  if (!s.handlers) return true;
5828  endsubmsg = (func*)upb_handlers_gethandler(s.handlers, sel, &hd);
5829 
5830  if (!endsubmsg) return s.closure;
5831  return endsubmsg(s.closure, hd);
5832 }
5833 
5834 #ifdef __cplusplus
5835 } /* extern "C" */
5836 
5837 /* A upb::Sink is an object that binds a upb::Handlers object to some runtime
5838  * state. It represents an endpoint to which data can be sent.
5839  *
5840  * TODO(haberman): right now all of these functions take selectors. Should they
5841  * take selectorbase instead?
5842  *
5843  * ie. instead of calling:
5844  * sink->StartString(FOO_FIELD_START_STRING, ...)
5845  * a selector base would let you say:
5846  * sink->StartString(FOO_FIELD, ...)
5847  *
5848  * This would make call sites a little nicer and require emitting fewer selector
5849  * definitions in .h files.
5850  *
5851  * But the current scheme has the benefit that you can retrieve a function
5852  * pointer for any handler with handlers->GetHandler(selector), without having
5853  * to have a separate GetHandler() function for each handler type. The JIT
5854  * compiler uses this. To accommodate we'd have to expose a separate
5855  * GetHandler() for every handler type.
5856  *
5857  * Also to ponder: selectors right now are independent of a specific Handlers
5858  * instance. In other words, they allocate a number to every possible handler
5859  * that *could* be registered, without knowing anything about what handlers
5860  * *are* registered. That means that using selectors as table offsets prohibits
5861  * us from compacting the handler table at Freeze() time. If the table is very
5862  * sparse, this could be wasteful.
5863  *
5864  * Having another selector-like thing that is specific to a Handlers instance
5865  * would allow this compacting, but then it would be impossible to write code
5866  * ahead-of-time that can be bound to any Handlers instance at runtime. For
5867  * example, a .proto file parser written as straight C will not know what
5868  * Handlers it will be bound to, so when it calls sink->StartString() what
5869  * selector will it pass? It needs a selector like we have today, that is
5870  * independent of any particular upb::Handlers.
5871  *
5872  * Is there a way then to allow Handlers table compaction? */
5873 class upb::Sink {
5874  public:
5875  /* Constructor with no initialization; must be Reset() before use. */
5876  Sink() {}
5877 
5878  Sink(const Sink&) = default;
5879  Sink& operator=(const Sink&) = default;
5880 
5881  Sink(const upb_sink& sink) : sink_(sink) {}
5882  Sink &operator=(const upb_sink &sink) {
5883  sink_ = sink;
5884  return *this;
5885  }
5886 
5887  upb_sink sink() { return sink_; }
5888 
5889  /* Constructs a new sink for the given frozen handlers and closure.
5890  *
5891  * TODO: once the Handlers know the expected closure type, verify that T
5892  * matches it. */
5893  template <class T> Sink(const upb_handlers* handlers, T* closure) {
5894  Reset(handlers, closure);
5895  }
5896 
5897  upb_sink* ptr() { return &sink_; }
5898 
5899  /* Resets the value of the sink. */
5900  template <class T> void Reset(const upb_handlers* handlers, T* closure) {
5901  upb_sink_reset(&sink_, handlers, closure);
5902  }
5903 
5904  /* Returns the top-level object that is bound to this sink.
5905  *
5906  * TODO: once the Handlers know the expected closure type, verify that T
5907  * matches it. */
5908  template <class T> T* GetObject() const {
5909  return static_cast<T*>(sink_.closure);
5910  }
5911 
5912  /* Functions for pushing data into the sink.
5913  *
5914  * These return false if processing should stop (either due to error or just
5915  * to suspend).
5916  *
5917  * These may not be called from within one of the same sink's handlers (in
5918  * other words, handlers are not re-entrant). */
5919 
5920  /* Should be called at the start and end of every message; both the top-level
5921  * message and submessages. This means that submessages should use the
5922  * following sequence:
5923  * sink->StartSubMessage(startsubmsg_selector);
5924  * sink->StartMessage();
5925  * // ...
5926  * sink->EndMessage(&status);
5927  * sink->EndSubMessage(endsubmsg_selector); */
5928  bool StartMessage() { return upb_sink_startmsg(sink_); }
5929  bool EndMessage(upb_status *status) {
5930  return upb_sink_endmsg(sink_, status);
5931  }
5932 
5933  /* Putting of individual values. These work for both repeated and
5934  * non-repeated fields, but for repeated fields you must wrap them in
5935  * calls to StartSequence()/EndSequence(). */
5936  bool PutInt32(HandlersPtr::Selector s, int32_t val) {
5937  return upb_sink_putint32(sink_, s, val);
5938  }
5939 
5940  bool PutInt64(HandlersPtr::Selector s, int64_t val) {
5941  return upb_sink_putint64(sink_, s, val);
5942  }
5943 
5944  bool PutUInt32(HandlersPtr::Selector s, uint32_t val) {
5945  return upb_sink_putuint32(sink_, s, val);
5946  }
5947 
5948  bool PutUInt64(HandlersPtr::Selector s, uint64_t val) {
5949  return upb_sink_putuint64(sink_, s, val);
5950  }
5951 
5952  bool PutFloat(HandlersPtr::Selector s, float val) {
5953  return upb_sink_putfloat(sink_, s, val);
5954  }
5955 
5956  bool PutDouble(HandlersPtr::Selector s, double val) {
5957  return upb_sink_putdouble(sink_, s, val);
5958  }
5959 
5960  bool PutBool(HandlersPtr::Selector s, bool val) {
5961  return upb_sink_putbool(sink_, s, val);
5962  }
5963 
5964  /* Putting of string/bytes values. Each string can consist of zero or more
5965  * non-contiguous buffers of data.
5966  *
5967  * For StartString(), the function will write a sink for the string to "sub."
5968  * The sub-sink must be used for any/all PutStringBuffer() calls. */
5969  bool StartString(HandlersPtr::Selector s, size_t size_hint, Sink* sub) {
5970  upb_sink sub_c;
5971  bool ret = upb_sink_startstr(sink_, s, size_hint, &sub_c);
5972  *sub = sub_c;
5973  return ret;
5974  }
5975 
5976  size_t PutStringBuffer(HandlersPtr::Selector s, const char *buf, size_t len,
5977  const upb_bufhandle *handle) {
5978  return upb_sink_putstring(sink_, s, buf, len, handle);
5979  }
5980 
5981  bool EndString(HandlersPtr::Selector s) {
5982  return upb_sink_endstr(sink_, s);
5983  }
5984 
5985  /* For submessage fields.
5986  *
5987  * For StartSubMessage(), the function will write a sink for the string to
5988  * "sub." The sub-sink must be used for any/all handlers called within the
5989  * submessage. */
5990  bool StartSubMessage(HandlersPtr::Selector s, Sink* sub) {
5991  upb_sink sub_c;
5992  bool ret = upb_sink_startsubmsg(sink_, s, &sub_c);
5993  *sub = sub_c;
5994  return ret;
5995  }
5996 
5997  bool EndSubMessage(HandlersPtr::Selector s) {
5998  return upb_sink_endsubmsg(sink_, s);
5999  }
6000 
6001  /* For repeated fields of any type, the sequence of values must be wrapped in
6002  * these calls.
6003  *
6004  * For StartSequence(), the function will write a sink for the string to
6005  * "sub." The sub-sink must be used for any/all handlers called within the
6006  * sequence. */
6007  bool StartSequence(HandlersPtr::Selector s, Sink* sub) {
6008  upb_sink sub_c;
6009  bool ret = upb_sink_startseq(sink_, s, &sub_c);
6010  *sub = sub_c;
6011  return ret;
6012  }
6013 
6014  bool EndSequence(HandlersPtr::Selector s) {
6015  return upb_sink_endseq(sink_, s);
6016  }
6017 
6018  /* Copy and assign specifically allowed.
6019  * We don't even bother making these members private because so many
6020  * functions need them and this is mainly just a dumb data container anyway.
6021  */
6022 
6023  private:
6024  upb_sink sink_;
6025 };
6026 
6027 #endif /* __cplusplus */
6028 
6029 /* upb_bytessink **************************************************************/
6030 
6031 typedef struct {
6033  void *closure;
6034 } upb_bytessink ;
6035 
6037  void *closure) {
6038  s->handler = h;
6039  s->closure = closure;
6040 }
6041 
6043  void **subc) {
6045  func *start;
6046  *subc = s.closure;
6047  if (!s.handler) return true;
6048  start = (func *)s.handler->table[UPB_STARTSTR_SELECTOR].func;
6049 
6050  if (!start) return true;
6051  *subc = start(s.closure,
6052  s.handler->table[UPB_STARTSTR_SELECTOR].attr.handler_data,
6053  size_hint);
6054  return *subc != NULL;
6055 }
6056 
6058  const char *buf, size_t size,
6059  const upb_bufhandle* handle) {
6060  typedef upb_string_handlerfunc func;
6061  func *putbuf;
6062  if (!s.handler) return true;
6063  putbuf = (func *)s.handler->table[UPB_STRING_SELECTOR].func;
6064 
6065  if (!putbuf) return true;
6066  return putbuf(subc, s.handler->table[UPB_STRING_SELECTOR].attr.handler_data,
6067  buf, size, handle);
6068 }
6069 
6072  func *end;
6073  if (!s.handler) return true;
6074  end = (func *)s.handler->table[UPB_ENDSTR_SELECTOR].func;
6075 
6076  if (!end) return true;
6077  return end(s.closure,
6078  s.handler->table[UPB_ENDSTR_SELECTOR].attr.handler_data);
6079 }
6080 
6081 #ifdef __cplusplus
6082 
6083 class upb::BytesSink {
6084  public:
6085  BytesSink() {}
6086 
6087  BytesSink(const BytesSink&) = default;
6088  BytesSink& operator=(const BytesSink&) = default;
6089 
6090  BytesSink(const upb_bytessink& sink) : sink_(sink) {}
6091  BytesSink &operator=(const upb_bytessink &sink) {
6092  sink_ = sink;
6093  return *this;
6094  }
6095 
6096  upb_bytessink sink() { return sink_; }
6097 
6098  /* Constructs a new sink for the given frozen handlers and closure.
6099  *
6100  * TODO(haberman): once the Handlers know the expected closure type, verify
6101  * that T matches it. */
6102  template <class T> BytesSink(const upb_byteshandler* handler, T* closure) {
6103  upb_bytessink_reset(sink_, handler, closure);
6104  }
6105 
6106  /* Resets the value of the sink. */
6107  template <class T> void Reset(const upb_byteshandler* handler, T* closure) {
6108  upb_bytessink_reset(&sink_, handler, closure);
6109  }
6110 
6111  bool Start(size_t size_hint, void **subc) {
6112  return upb_bytessink_start(sink_, size_hint, subc);
6113  }
6114 
6115  size_t PutBuffer(void *subc, const char *buf, size_t len,
6116  const upb_bufhandle *handle) {
6117  return upb_bytessink_putbuf(sink_, subc, buf, len, handle);
6118  }
6119 
6120  bool End() {
6121  return upb_bytessink_end(sink_);
6122  }
6123 
6124  private:
6125  upb_bytessink sink_;
6126 };
6127 
6128 #endif /* __cplusplus */
6129 
6130 /* upb_bufsrc *****************************************************************/
6131 
6132 #ifdef __cplusplus
6133 extern "C" {
6134 #endif
6135 
6136 bool upb_bufsrc_putbuf(const char *buf, size_t len, upb_bytessink sink);
6137 
6138 #ifdef __cplusplus
6139 } /* extern "C" */
6140 
6141 namespace upb {
6142 template <class T> bool PutBuffer(const T& str, BytesSink sink) {
6143  return upb_bufsrc_putbuf(str.data(), str.size(), sink.sink());
6144 }
6145 }
6146 
6147 #endif /* __cplusplus */
6148 
6149 #endif
6150 
6151 
6152 #ifndef UPB_MSGFACTORY_H_
6153 #define UPB_MSGFACTORY_H_
6154 
6157 struct upb_msgfactory;
6159 
6160 #ifdef __cplusplus
6161 extern "C" {
6162 #endif
6163 
6164 /* A upb_msgfactory contains a cache of upb_msglayout, upb_handlers, and
6165  * upb_visitorplan objects. These are the objects necessary to represent,
6166  * populate, and and visit upb_msg objects.
6167  *
6168  * These caches are all populated by upb_msgdef, and lazily created on demand.
6169  */
6170 
6171 /* Creates and destroys a msgfactory, respectively. The messages for this
6172  * msgfactory must come from |symtab| (which should outlive the msgfactory). */
6175 
6177 
6178 /* The functions to get cached objects, lazily creating them on demand. These
6179  * all require:
6180  *
6181  * - m is in upb_msgfactory_symtab(f)
6182  * - upb_msgdef_mapentry(m) == false (since map messages can't have layouts).
6183  *
6184  * The returned objects will live for as long as the msgfactory does.
6185  *
6186  * TODO(haberman): consider making this thread-safe and take a const
6187  * upb_msgfactory. */
6189  const upb_msgdef *m);
6190 
6191 #ifdef __cplusplus
6192 } /* extern "C" */
6193 #endif
6194 
6195 #endif /* UPB_MSGFACTORY_H_ */
6196 /*
6197 ** Internal-only definitions for the decoder.
6198 */
6199 
6200 #ifndef UPB_DECODER_INT_H_
6201 #define UPB_DECODER_INT_H_
6202 
6203 /*
6204 ** upb::pb::Decoder
6205 **
6206 ** A high performance, streaming, resumable decoder for the binary protobuf
6207 ** format.
6208 **
6209 ** This interface works the same regardless of what decoder backend is being
6210 ** used. A client of this class does not need to know whether decoding is using
6211 ** a JITted decoder (DynASM, LLVM, etc) or an interpreted decoder. By default,
6212 ** it will always use the fastest available decoder. However, you can call
6213 ** set_allow_jit(false) to disable any JIT decoder that might be available.
6214 ** This is primarily useful for testing purposes.
6215 */
6216 
6217 #ifndef UPB_DECODER_H_
6218 #define UPB_DECODER_H_
6219 
6220 
6221 #ifdef __cplusplus
6222 namespace upb {
6223 namespace pb {
6224 class CodeCache;
6225 class DecoderPtr;
6226 class DecoderMethodPtr;
6227 class DecoderMethodOptions;
6228 } /* namespace pb */
6229 } /* namespace upb */
6230 #endif
6231 
6232 /* The maximum number of bytes we are required to buffer internally between
6233  * calls to the decoder. The value is 14: a 5 byte unknown tag plus ten-byte
6234  * varint, less one because we are buffering an incomplete value.
6235  *
6236  * Should only be used by unit tests. */
6237 #define UPB_DECODER_MAX_RESIDUAL_BYTES 14
6238 
6239 /* upb_pbdecodermethod ********************************************************/
6240 
6241 struct upb_pbdecodermethod;
6243 
6244 #ifdef __cplusplus
6245 extern "C" {
6246 #endif
6247 
6249  const upb_pbdecodermethod *m);
6251  const upb_pbdecodermethod *m);
6253 
6254 #ifdef __cplusplus
6255 } /* extern "C" */
6256 
6257 /* Represents the code to parse a protobuf according to a destination
6258  * Handlers. */
6259 class upb::pb::DecoderMethodPtr {
6260  public:
6261  DecoderMethodPtr() : ptr_(nullptr) {}
6262  DecoderMethodPtr(const upb_pbdecodermethod* ptr) : ptr_(ptr) {}
6263 
6264  const upb_pbdecodermethod* ptr() { return ptr_; }
6265 
6266  /* The destination handlers that are statically bound to this method.
6267  * This method is only capable of outputting to a sink that uses these
6268  * handlers. */
6269  const Handlers *dest_handlers() const {
6270  return upb_pbdecodermethod_desthandlers(ptr_);
6271  }
6272 
6273  /* The input handlers for this decoder method. */
6274  const BytesHandler* input_handler() const {
6275  return upb_pbdecodermethod_inputhandler(ptr_);
6276  }
6277 
6278  /* Whether this method is native. */
6279  bool is_native() const {
6280  return upb_pbdecodermethod_isnative(ptr_);
6281  }
6282 
6283  private:
6284  const upb_pbdecodermethod* ptr_;
6285 };
6286 
6287 #endif
6288 
6289 /* upb_pbdecoder **************************************************************/
6290 
6291 /* Preallocation hint: decoder won't allocate more bytes than this when first
6292  * constructed. This hint may be an overestimate for some build configurations.
6293  * But if the decoder library is upgraded without recompiling the application,
6294  * it may be an underestimate. */
6295 #define UPB_PB_DECODER_SIZE 4416
6296 
6297 struct upb_pbdecoder;
6299 
6300 #ifdef __cplusplus
6301 extern "C" {
6302 #endif
6303 
6305  const upb_pbdecodermethod *method,
6309 uint64_t upb_pbdecoder_bytesparsed(const upb_pbdecoder *d);
6310 size_t upb_pbdecoder_maxnesting(const upb_pbdecoder *d);
6311 bool upb_pbdecoder_setmaxnesting(upb_pbdecoder *d, size_t max);
6313 
6314 #ifdef __cplusplus
6315 } /* extern "C" */
6316 
6317 /* A Decoder receives binary protobuf data on its input sink and pushes the
6318  * decoded data to its output sink. */
6319 class upb::pb::DecoderPtr {
6320  public:
6321  DecoderPtr() : ptr_(nullptr) {}
6322  DecoderPtr(upb_pbdecoder* ptr) : ptr_(ptr) {}
6323 
6324  upb_pbdecoder* ptr() { return ptr_; }
6325 
6326  /* Constructs a decoder instance for the given method, which must outlive this
6327  * decoder. Any errors during parsing will be set on the given status, which
6328  * must also outlive this decoder.
6329  *
6330  * The sink must match the given method. */
6331  static DecoderPtr Create(Arena *arena, DecoderMethodPtr method,
6332  upb::Sink output, Status *status) {
6333  return DecoderPtr(upb_pbdecoder_create(arena->ptr(), method.ptr(),
6334  output.sink(), status->ptr()));
6335  }
6336 
6337  /* Returns the DecoderMethod this decoder is parsing from. */
6338  const DecoderMethodPtr method() const {
6339  return DecoderMethodPtr(upb_pbdecoder_method(ptr_));
6340  }
6341 
6342  /* The sink on which this decoder receives input. */
6343  BytesSink input() { return BytesSink(upb_pbdecoder_input(ptr())); }
6344 
6345  /* Returns number of bytes successfully parsed.
6346  *
6347  * This can be useful for determining the stream position where an error
6348  * occurred.
6349  *
6350  * This value may not be up-to-date when called from inside a parsing
6351  * callback. */
6352  uint64_t BytesParsed() { return upb_pbdecoder_bytesparsed(ptr()); }
6353 
6354  /* Gets/sets the parsing nexting limit. If the total number of nested
6355  * submessages and repeated fields hits this limit, parsing will fail. This
6356  * is a resource limit that controls the amount of memory used by the parsing
6357  * stack.
6358  *
6359  * Setting the limit will fail if the parser is currently suspended at a depth
6360  * greater than this, or if memory allocation of the stack fails. */
6361  size_t max_nesting() { return upb_pbdecoder_maxnesting(ptr()); }
6362  bool set_max_nesting(size_t max) { return upb_pbdecoder_maxnesting(ptr()); }
6363 
6364  void Reset() { upb_pbdecoder_reset(ptr()); }
6365 
6366  static const size_t kSize = UPB_PB_DECODER_SIZE;
6367 
6368  private:
6369  upb_pbdecoder *ptr_;
6370 };
6371 
6372 #endif /* __cplusplus */
6373 
6374 /* upb_pbcodecache ************************************************************/
6375 
6376 /* Lazily builds and caches decoder methods that will push data to the given
6377  * handlers. The destination handlercache must outlive this object. */
6378 
6379 struct upb_pbcodecache;
6381 
6382 #ifdef __cplusplus
6383 extern "C" {
6384 #endif
6385 
6389 void upb_pbcodecache_setallowjit(upb_pbcodecache *c, bool allow);
6392  const upb_msgdef *md);
6393 
6394 #ifdef __cplusplus
6395 } /* extern "C" */
6396 
6397 /* A class for caching protobuf processing code, whether bytecode for the
6398  * interpreted decoder or machine code for the JIT.
6399  *
6400  * This class is not thread-safe. */
6401 class upb::pb::CodeCache {
6402  public:
6403  CodeCache(upb::HandlerCache *dest)
6404  : ptr_(upb_pbcodecache_new(dest->ptr()), upb_pbcodecache_free) {}
6405  CodeCache(CodeCache&&) = default;
6406  CodeCache& operator=(CodeCache&&) = default;
6407 
6408  upb_pbcodecache* ptr() { return ptr_.get(); }
6409  const upb_pbcodecache* ptr() const { return ptr_.get(); }
6410 
6411  /* Whether the cache is allowed to generate machine code. Defaults to true.
6412  * There is no real reason to turn it off except for testing or if you are
6413  * having a specific problem with the JIT.
6414  *
6415  * Note that allow_jit = true does not *guarantee* that the code will be JIT
6416  * compiled. If this platform is not supported or the JIT was not compiled
6417  * in, the code may still be interpreted. */
6418  bool allow_jit() const { return upb_pbcodecache_allowjit(ptr()); }
6419 
6420  /* This may only be called when the object is first constructed, and prior to
6421  * any code generation. */
6422  void set_allow_jit(bool allow) { upb_pbcodecache_setallowjit(ptr(), allow); }
6423 
6424  /* Should the decoder push submessages to lazy handlers for fields that have
6425  * them? The caller should set this iff the lazy handlers expect data that is
6426  * in protobuf binary format and the caller wishes to lazy parse it. */
6427  void set_lazy(bool lazy) { upb_pbcodecache_setlazy(ptr(), lazy); }
6428 
6429  /* Returns a DecoderMethod that can push data to the given handlers.
6430  * If a suitable method already exists, it will be returned from the cache. */
6431  const DecoderMethodPtr Get(MessageDefPtr md) {
6432  return DecoderMethodPtr(upb_pbcodecache_get(ptr(), md.ptr()));
6433  }
6434 
6435  private:
6436  std::unique_ptr<upb_pbcodecache, decltype(&upb_pbcodecache_free)> ptr_;
6437 };
6438 
6439 #endif /* __cplusplus */
6440 
6441 #endif /* UPB_DECODER_H_ */
6442 
6443 /* Opcode definitions. The canonical meaning of each opcode is its
6444  * implementation in the interpreter (the JIT is written to match this).
6445  *
6446  * All instructions have the opcode in the low byte.
6447  * Instruction format for most instructions is:
6448  *
6449  * +-------------------+--------+
6450  * | arg (24) | op (8) |
6451  * +-------------------+--------+
6452  *
6453  * Exceptions are indicated below. A few opcodes are multi-word. */
6454 typedef enum {
6455  /* Opcodes 1-8, 13, 15-18 parse their respective descriptor types.
6456  * Arg for all of these is the upb selector for this field. */
6457 #define T(type) OP_PARSE_ ## type = UPB_DESCRIPTOR_TYPE_ ## type
6458  T(DOUBLE), T(FLOAT), T(INT64), T(UINT64), T(INT32), T(FIXED64), T(FIXED32),
6459  T(BOOL), T(UINT32), T(SFIXED32), T(SFIXED64), T(SINT32), T(SINT64),
6460 #undef T
6461  OP_STARTMSG = 9, /* No arg. */
6462  OP_ENDMSG = 10, /* No arg. */
6470 
6471  OP_PUSHTAGDELIM = 23, /* No arg. */
6472  OP_PUSHLENDELIM = 24, /* No arg. */
6473  OP_POP = 25, /* No arg. */
6474  OP_SETDELIM = 26, /* No arg. */
6475  OP_SETBIGGROUPNUM = 27, /* two words:
6476  * | unused (24) | opc (8) |
6477  * | groupnum (32) | */
6479  OP_CALL = 29,
6480  OP_RET = 30,
6482 
6483  /* Different opcodes depending on how many bytes expected. */
6484  OP_TAG1 = 32, /* | match tag (16) | jump target (8) | opc (8) | */
6485  OP_TAG2 = 33, /* | match tag (16) | jump target (8) | opc (8) | */
6486  OP_TAGN = 34, /* three words: */
6487  /* | unused (16) | jump target(8) | opc (8) | */
6488  /* | match tag 1 (32) | */
6489  /* | match tag 2 (32) | */
6490 
6491  OP_SETDISPATCH = 35, /* N words: */
6492  /* | unused (24) | opc | */
6493  /* | upb_inttable* (32 or 64) | */
6494 
6495  OP_DISPATCH = 36, /* No arg. */
6496 
6497  OP_HALT = 37 /* No arg. */
6498 } opcode;
6499 
6500 #define OP_MAX OP_HALT
6501 
6502 UPB_INLINE opcode getop(uint32_t instr) { return (opcode)(instr & 0xff); }
6503 
6508  bool lazy;
6509 
6510  /* Array of mgroups. */
6512 };
6513 
6514 /* Method group; represents a set of decoder methods that had their code
6515  * emitted together. Immutable once created. */
6516 typedef struct {
6517  /* Maps upb_msgdef/upb_handlers -> upb_pbdecodermethod. Owned by us.
6518  *
6519  * Ideally this would be on pbcodecache (if we were actually caching code).
6520  * Right now we don't actually cache anything, which is wasteful. */
6522 
6523  /* The bytecode for our methods, if any exists. Owned by us. */
6524  uint32_t *bytecode;
6525  uint32_t *bytecode_end;
6526 
6527 #ifdef UPB_USE_JIT_X64
6528  /* JIT-generated machine code, if any. */
6529  upb_string_handlerfunc *jit_code;
6530  /* The size of the jit_code (required to munmap()). */
6531  size_t jit_size;
6532  char *debug_info;
6533  void *dl;
6534 #endif
6535 } mgroup;
6536 
6537 /* The maximum that any submessages can be nested. Matches proto2's limit.
6538  * This specifies the size of the decoder's statically-sized array and therefore
6539  * setting it high will cause the upb::pb::Decoder object to be larger.
6540  *
6541  * If necessary we can add a runtime-settable property to Decoder that allow
6542  * this to be larger than the compile-time setting, but this would add
6543  * complexity, particularly since we would have to decide how/if to give users
6544  * the ability to set a custom memory allocation function. */
6545 #define UPB_DECODER_MAX_NESTING 64
6546 
6547 /* Internal-only struct used by the decoder. */
6548 typedef struct {
6549  /* Space optimization note: we store two pointers here that the JIT
6550  * doesn't need at all; the upb_handlers* inside the sink and
6551  * the dispatch table pointer. We can optimze so that the JIT uses
6552  * smaller stack frames than the interpreter. The only thing we need
6553  * to guarantee is that the fallback routines can find end_ofs. */
6555 
6556  /* The absolute stream offset of the end-of-frame delimiter.
6557  * Non-delimited frames (groups and non-packed repeated fields) reuse the
6558  * delimiter of their parent, even though the frame may not end there.
6559  *
6560  * NOTE: the JIT stores a slightly different value here for non-top frames.
6561  * It stores the value relative to the end of the enclosed message. But the
6562  * top frame is still stored the same way, which is important for ensuring
6563  * that calls from the JIT into C work correctly. */
6564  uint64_t end_ofs;
6565  const uint32_t *base;
6566 
6567  /* 0 indicates a length-delimited field.
6568  * A positive number indicates a known group.
6569  * A negative number indicates an unknown group. */
6570  int32_t groupnum;
6571  upb_inttable *dispatch; /* Not used by the JIT. */
6573 
6575  /* While compiling, the base is relative in "ofs", after compiling it is
6576  * absolute in "ptr". */
6577  union {
6578  uint32_t ofs; /* PC offset of method. */
6579  void *ptr; /* Pointer to bytecode or machine code for this method. */
6580  } code_base;
6581 
6582  /* The decoder method group to which this method belongs. */
6583  const mgroup *group;
6584 
6585  /* Whether this method is native code or bytecode. */
6587 
6588  /* The handler one calls to invoke this method. */
6590 
6591  /* The destination handlers this method is bound to. We own a ref. */
6593 
6594  /* Dispatch table -- used by both bytecode decoder and JIT when encountering a
6595  * field number that wasn't the one we were expecting to see. See
6596  * decoder.int.h for the layout of this table. */
6598 };
6599 
6602 
6603  /* Our input sink. */
6605 
6606  /* The decoder method we are parsing with (owned). */
6608 
6609  size_t call_len;
6610  const uint32_t *pc, *last;
6611 
6612  /* Current input buffer and its stream offset. */
6613  const char *buf, *ptr, *end, *checkpoint;
6614 
6615  /* End of the delimited region, relative to ptr, NULL if not in this buf. */
6616  const char *delim_end;
6617 
6618  /* End of the delimited region, relative to ptr, end if not in this buf. */
6619  const char *data_end;
6620 
6621  /* Overall stream offset of "buf." */
6622  uint64_t bufstart_ofs;
6623 
6624  /* Buffer for residual bytes not parsed from the previous buffer. */
6627 
6628  /* Bytes of data that should be discarded from the input beore we start
6629  * parsing again. We set this when we internally determine that we can
6630  * safely skip the next N bytes, but this region extends past the current
6631  * user buffer. */
6632  size_t skip;
6633 
6634  /* Stores the user buffer passed to our decode function. */
6635  const char *buf_param;
6636  size_t size_param;
6638 
6639  /* Our internal stack. */
6641  const uint32_t **callstack;
6642  size_t stack_size;
6643 
6645 
6646 #ifdef UPB_USE_JIT_X64
6647  /* Used momentarily by the generated code to store a value while a user
6648  * function is called. */
6649  uint32_t tmp_len;
6650 
6651  const void *saved_rsp;
6652 #endif
6653 };
6654 
6655 /* Decoder entry points; used as handlers. */
6656 void *upb_pbdecoder_startbc(void *closure, const void *pc, size_t size_hint);
6657 void *upb_pbdecoder_startjit(void *closure, const void *hd, size_t size_hint);
6658 size_t upb_pbdecoder_decode(void *closure, const void *hd, const char *buf,
6659  size_t size, const upb_bufhandle *handle);
6660 bool upb_pbdecoder_end(void *closure, const void *handler_data);
6661 
6662 /* Decoder-internal functions that the JIT calls to handle fallback paths. */
6663 int32_t upb_pbdecoder_resume(upb_pbdecoder *d, void *p, const char *buf,
6664  size_t size, const upb_bufhandle *handle);
6666 int32_t upb_pbdecoder_skipunknown(upb_pbdecoder *d, int32_t fieldnum,
6667  uint8_t wire_type);
6668 int32_t upb_pbdecoder_checktag_slow(upb_pbdecoder *d, uint64_t expected);
6669 int32_t upb_pbdecoder_decode_varint_slow(upb_pbdecoder *d, uint64_t *u64);
6670 int32_t upb_pbdecoder_decode_f32(upb_pbdecoder *d, uint32_t *u32);
6671 int32_t upb_pbdecoder_decode_f64(upb_pbdecoder *d, uint64_t *u64);
6672 void upb_pbdecoder_seterr(upb_pbdecoder *d, const char *msg);
6673 
6674 /* Error messages that are shared between the bytecode and JIT decoders. */
6675 extern const char *kPbDecoderStackOverflow;
6676 extern const char *kPbDecoderSubmessageTooLong;
6677 
6678 /* Access to decoderplan members needed by the decoder. */
6679 const char *upb_pbdecoder_getopname(unsigned int op);
6680 
6681 /* JIT codegen entry point. */
6684 
6685 /* A special label that means "do field dispatch for this message and branch to
6686  * wherever that takes you." */
6687 #define LABEL_DISPATCH 0
6688 
6689 /* A special slot in the dispatch table that stores the epilogue (ENDMSG and/or
6690  * RET) for branching to when we find an appropriate ENDGROUP tag. */
6691 #define DISPATCH_ENDMSG 0
6692 
6693 /* It's important to use this invalid wire type instead of 0 (which is a valid
6694  * wire type). */
6695 #define NO_WIRE_TYPE 0xff
6696 
6697 /* The dispatch table layout is:
6698  * [field number] -> [ 48-bit offset ][ 8-bit wt2 ][ 8-bit wt1 ]
6699  *
6700  * If wt1 matches, jump to the 48-bit offset. If wt2 matches, lookup
6701  * (UPB_MAX_FIELDNUMBER + fieldnum) and jump there.
6702  *
6703  * We need two wire types because of packed/non-packed compatibility. A
6704  * primitive repeated field can use either wire type and be valid. While we
6705  * could key the table on fieldnum+wiretype, the table would be 8x sparser.
6706  *
6707  * Storing two wire types in the primary value allows us to quickly rule out
6708  * the second wire type without needing to do a separate lookup (this case is
6709  * less common than an unknown field). */
6710 UPB_INLINE uint64_t upb_pbdecoder_packdispatch(uint64_t ofs, uint8_t wt1,
6711  uint8_t wt2) {
6712  return (ofs << 16) | (wt2 << 8) | wt1;
6713 }
6714 
6715 UPB_INLINE void upb_pbdecoder_unpackdispatch(uint64_t dispatch, uint64_t *ofs,
6716  uint8_t *wt1, uint8_t *wt2) {
6717  *wt1 = (uint8_t)dispatch;
6718  *wt2 = (uint8_t)(dispatch >> 8);
6719  *ofs = dispatch >> 16;
6720 }
6721 
6722 /* All of the functions in decoder.c that return int32_t return values according
6723  * to the following scheme:
6724  * 1. negative values indicate a return code from the following list.
6725  * 2. positive values indicate that error or end of buffer was hit, and
6726  * that the decode function should immediately return the given value
6727  * (the decoder state has already been suspended and is ready to be
6728  * resumed). */
6729 #define DECODE_OK -1
6730 #define DECODE_MISMATCH -2 /* Used only from checktag_slow(). */
6731 #define DECODE_ENDGROUP -3 /* Used only from checkunknown(). */
6732 
6733 #define CHECK_RETURN(x) { int32_t ret = x; if (ret >= 0) return ret; }
6734 
6735 #endif /* UPB_DECODER_INT_H_ */
6736 /*
6737 ** A number of routines for varint manipulation (we keep them all around to
6738 ** have multiple approaches available for benchmarking).
6739 */
6740 
6741 #ifndef UPB_VARINT_DECODER_H_
6742 #define UPB_VARINT_DECODER_H_
6743 
6744 #include <assert.h>
6745 #include <stdint.h>
6746 #include <string.h>
6747 
6748 #ifdef __cplusplus
6749 extern "C" {
6750 #endif
6751 
6752 #define UPB_MAX_WIRE_TYPE 5
6753 
6754 /* The maximum number of bytes that it takes to encode a 64-bit varint. */
6755 #define UPB_PB_VARINT_MAX_LEN 10
6756 
6757 /* Array of the "native" (ie. non-packed-repeated) wire type for the given a
6758  * descriptor type (upb_descriptortype_t). */
6759 extern const uint8_t upb_pb_native_wire_types[];
6760 
6761 UPB_INLINE uint64_t byteswap64(uint64_t val)
6762 {
6763  return ((((val) & 0xff00000000000000ull) >> 56)
6764  | (((val) & 0x00ff000000000000ull) >> 40)
6765  | (((val) & 0x0000ff0000000000ull) >> 24)
6766  | (((val) & 0x000000ff00000000ull) >> 8)
6767  | (((val) & 0x00000000ff000000ull) << 8)
6768  | (((val) & 0x0000000000ff0000ull) << 24)
6769  | (((val) & 0x000000000000ff00ull) << 40)
6770  | (((val) & 0x00000000000000ffull) << 56));
6771 }
6772 
6773 /* Zig-zag encoding/decoding **************************************************/
6774 
6775 UPB_INLINE int32_t upb_zzdec_32(uint32_t n) {
6776  return (n >> 1) ^ -(int32_t)(n & 1);
6777 }
6778 UPB_INLINE int64_t upb_zzdec_64(uint64_t n) {
6779  return (n >> 1) ^ -(int64_t)(n & 1);
6780 }
6781 UPB_INLINE uint32_t upb_zzenc_32(int32_t n) { return (n << 1) ^ (n >> 31); }
6782 UPB_INLINE uint64_t upb_zzenc_64(int64_t n) { return (n << 1) ^ (n >> 63); }
6783 
6784 /* Decoding *******************************************************************/
6785 
6786 /* All decoding functions return this struct by value. */
6787 typedef struct {
6788  const char *p; /* NULL if the varint was unterminated. */
6789  uint64_t val;
6790 } upb_decoderet;
6791 
6793  upb_decoderet ret;
6794  ret.p = p;
6795  ret.val = val;
6796  return ret;
6797 }
6798 
6801 
6802 /* Template for a function that checks the first two bytes with branching
6803  * and dispatches 2-10 bytes with a separate function. Note that this may read
6804  * up to 10 bytes, so it must not be used unless there are at least ten bytes
6805  * left in the buffer! */
6806 #define UPB_VARINT_DECODER_CHECK2(name, decode_max8_function) \
6807 UPB_INLINE upb_decoderet upb_vdecode_check2_ ## name(const char *_p) { \
6808  uint8_t *p = (uint8_t*)_p; \
6809  upb_decoderet r; \
6810  if ((*p & 0x80) == 0) { \
6811  /* Common case: one-byte varint. */ \
6812  return upb_decoderet_make(_p + 1, *p & 0x7fU); \
6813  } \
6814  r = upb_decoderet_make(_p + 2, (*p & 0x7fU) | ((*(p + 1) & 0x7fU) << 7)); \
6815  if ((*(p + 1) & 0x80) == 0) { \
6816  /* Two-byte varint. */ \
6817  return r; \
6818  } \
6819  /* Longer varint, fallback to out-of-line function. */ \
6820  return decode_max8_function(r); \
6821 }
6822 
6825 #undef UPB_VARINT_DECODER_CHECK2
6826 
6827 /* Our canonical functions for decoding varints, based on the currently
6828  * favored best-performing implementations. */
6830  if (sizeof(long) == 8)
6831  return upb_vdecode_check2_branch64(p);
6832  else
6833  return upb_vdecode_check2_branch32(p);
6834 }
6835 
6836 
6837 /* Encoding *******************************************************************/
6838 
6840 #ifdef __GNUC__
6841  int high_bit = 63 - __builtin_clzll(val); /* 0-based, undef if val == 0. */
6842 #else
6843  int high_bit = 0;
6844  uint64_t tmp = val;
6845  while(tmp >>= 1) high_bit++;
6846 #endif
6847  return val == 0 ? 1 : high_bit / 8 + 1;
6848 }
6849 
6850 /* Encodes a 64-bit varint into buf (which must be >=UPB_PB_VARINT_MAX_LEN
6851  * bytes long), returning how many bytes were used.
6852  *
6853  * TODO: benchmark and optimize if necessary. */
6854 UPB_INLINE size_t upb_vencode64(uint64_t val, char *buf) {
6855  size_t i;
6856  if (val == 0) { buf[0] = 0; return 1; }
6857  i = 0;
6858  while (val) {
6859  uint8_t byte = val & 0x7fU;
6860  val >>= 7;
6861  if (val) byte |= 0x80U;
6862  buf[i++] = byte;
6863  }
6864  return i;
6865 }
6866 
6867 UPB_INLINE size_t upb_varint_size(uint64_t val) {
6868  char buf[UPB_PB_VARINT_MAX_LEN];
6869  return upb_vencode64(val, buf);
6870 }
6871 
6872 /* Encodes a 32-bit varint, *not* sign-extended. */
6873 UPB_INLINE uint64_t upb_vencode32(uint32_t val) {
6874  char buf[UPB_PB_VARINT_MAX_LEN];
6875  size_t bytes = upb_vencode64(val, buf);
6876  uint64_t ret = 0;
6877  UPB_ASSERT(bytes <= 5);
6878  memcpy(&ret, buf, bytes);
6879 #ifdef UPB_BIG_ENDIAN
6880  ret = byteswap64(ret);
6881 #endif
6882  UPB_ASSERT(ret <= 0xffffffffffU);
6883  return ret;
6884 }
6885 
6886 #ifdef __cplusplus
6887 } /* extern "C" */
6888 #endif
6889 
6890 #endif /* UPB_VARINT_DECODER_H_ */
6891 /*
6892 ** upb::pb::Encoder (upb_pb_encoder)
6893 **
6894 ** Implements a set of upb_handlers that write protobuf data to the binary wire
6895 ** format.
6896 **
6897 ** This encoder implementation does not have any access to any out-of-band or
6898 ** precomputed lengths for submessages, so it must buffer submessages internally
6899 ** before it can emit the first byte.
6900 */
6901 
6902 #ifndef UPB_ENCODER_H_
6903 #define UPB_ENCODER_H_
6904 
6905 
6906 #ifdef __cplusplus
6907 namespace upb {
6908 namespace pb {
6909 class EncoderPtr;
6910 } /* namespace pb */
6911 } /* namespace upb */
6912 #endif
6913 
6914 #define UPB_PBENCODER_MAX_NESTING 100
6915 
6916 /* upb_pb_encoder *************************************************************/
6917 
6918 /* Preallocation hint: decoder won't allocate more bytes than this when first
6919  * constructed. This hint may be an overestimate for some build configurations.
6920  * But if the decoder library is upgraded without recompiling the application,
6921  * it may be an underestimate. */
6922 #define UPB_PB_ENCODER_SIZE 784
6923 
6924 struct upb_pb_encoder;
6926 
6927 #ifdef __cplusplus
6928 extern "C" {
6929 #endif
6930 
6934 
6935 /* Lazily builds and caches handlers that will push encoded data to a bytessink.
6936  * Any msgdef objects used with this object must outlive it. */
6938 
6939 #ifdef __cplusplus
6940 } /* extern "C" { */
6941 
6942 class upb::pb::EncoderPtr {
6943  public:
6944  EncoderPtr(upb_pb_encoder* ptr) : ptr_(ptr) {}
6945 
6946  upb_pb_encoder* ptr() { return ptr_; }
6947 
6948  /* Creates a new encoder in the given environment. The Handlers must have
6949  * come from NewHandlers() below. */
6950  static EncoderPtr Create(Arena* arena, const Handlers* handlers,
6951  BytesSink output) {
6952  return EncoderPtr(
6953  upb_pb_encoder_create(arena->ptr(), handlers, output.sink()));
6954  }
6955 
6956  /* The input to the encoder. */
6957  upb::Sink input() { return upb_pb_encoder_input(ptr()); }
6958 
6959  /* Creates a new set of handlers for this MessageDef. */
6960  static HandlerCache NewCache() {
6961  return HandlerCache(upb_pb_encoder_newcache());
6962  }
6963 
6964  static const size_t kSize = UPB_PB_ENCODER_SIZE;
6965 
6966  private:
6967  upb_pb_encoder* ptr_;
6968 };
6969 
6970 #endif /* __cplusplus */
6971 
6972 #endif /* UPB_ENCODER_H_ */
6973 /*
6974 ** upb::pb::TextPrinter (upb_textprinter)
6975 **
6976 ** Handlers for writing to protobuf text format.
6977 */
6978 
6979 #ifndef UPB_TEXT_H_
6980 #define UPB_TEXT_H_
6981 
6982 
6983 #ifdef __cplusplus
6984 namespace upb {
6985 namespace pb {
6986 class TextPrinterPtr;
6987 } /* namespace pb */
6988 } /* namespace upb */
6989 #endif
6990 
6991 /* upb_textprinter ************************************************************/
6992 
6993 struct upb_textprinter;
6995 
6996 #ifdef __cplusplus
6997 extern "C" {
6998 #endif
6999 
7000 /* C API. */
7003 void upb_textprinter_setsingleline(upb_textprinter *p, bool single_line);
7006 
7007 #ifdef __cplusplus
7008 } /* extern "C" */
7009 
7010 class upb::pb::TextPrinterPtr {
7011  public:
7012  TextPrinterPtr(upb_textprinter* ptr) : ptr_(ptr) {}
7013 
7014  /* The given handlers must have come from NewHandlers(). It must outlive the
7015  * TextPrinter. */
7016  static TextPrinterPtr Create(Arena *arena, upb::HandlersPtr *handlers,
7017  BytesSink output) {
7018  return TextPrinterPtr(
7019  upb_textprinter_create(arena->ptr(), handlers->ptr(), output.sink()));
7020  }
7021 
7022  void SetSingleLineMode(bool single_line) {
7023  upb_textprinter_setsingleline(ptr_, single_line);
7024  }
7025 
7026  Sink input() { return upb_textprinter_input(ptr_); }
7027 
7028  /* If handler caching becomes a requirement we can add a code cache as in
7029  * decoder.h */
7030  static HandlerCache NewCache() {
7031  return HandlerCache(upb_textprinter_newcache());
7032  }
7033 
7034  private:
7035  upb_textprinter* ptr_;
7036 };
7037 
7038 #endif
7039 
7040 #endif /* UPB_TEXT_H_ */
7041 /*
7042 ** upb::json::Parser (upb_json_parser)
7043 **
7044 ** Parses JSON according to a specific schema.
7045 ** Support for parsing arbitrary JSON (schema-less) will be added later.
7046 */
7047 
7048 #ifndef UPB_JSON_PARSER_H_
7049 #define UPB_JSON_PARSER_H_
7050 
7051 
7052 #ifdef __cplusplus
7053 namespace upb {
7054 namespace json {
7055 class CodeCache;
7056 class ParserPtr;
7057 class ParserMethodPtr;
7058 } /* namespace json */
7059 } /* namespace upb */
7060 #endif
7061 
7062 /* upb_json_parsermethod ******************************************************/
7063 
7064 struct upb_json_parsermethod;
7066 
7067 #ifdef __cplusplus
7068 extern "C" {
7069 #endif
7070 
7072  const upb_json_parsermethod* m);
7073 
7074 #ifdef __cplusplus
7075 } /* extern "C" */
7076 
7077 class upb::json::ParserMethodPtr {
7078  public:
7079  ParserMethodPtr() : ptr_(nullptr) {}
7080  ParserMethodPtr(const upb_json_parsermethod* ptr) : ptr_(ptr) {}
7081 
7082  const upb_json_parsermethod* ptr() const { return ptr_; }
7083 
7084  const BytesHandler* input_handler() const {
7085  return upb_json_parsermethod_inputhandler(ptr());
7086  }
7087 
7088  private:
7089  const upb_json_parsermethod* ptr_;
7090 };
7091 
7092 #endif /* __cplusplus */
7093 
7094 /* upb_json_parser ************************************************************/
7095 
7096 /* Preallocation hint: parser won't allocate more bytes than this when first
7097  * constructed. This hint may be an overestimate for some build configurations.
7098  * But if the parser library is upgraded without recompiling the application,
7099  * it may be an underestimate. */
7100 #define UPB_JSON_PARSER_SIZE 5712
7101 
7102 struct upb_json_parser;
7104 
7105 #ifdef __cplusplus
7106 extern "C" {
7107 #endif
7108 
7110  const upb_json_parsermethod* m,
7111  const upb_symtab* symtab,
7112  upb_sink output,
7113  upb_status *status,
7114  bool ignore_json_unknown);
7116 
7117 #ifdef __cplusplus
7118 } /* extern "C" */
7119 
7120 /* Parses an incoming BytesStream, pushing the results to the destination
7121  * sink. */
7122 class upb::json::ParserPtr {
7123  public:
7124  ParserPtr(upb_json_parser* ptr) : ptr_(ptr) {}
7125 
7126  static ParserPtr Create(Arena* arena, ParserMethodPtr method,
7127  SymbolTable* symtab, Sink output, Status* status,
7128  bool ignore_json_unknown) {
7129  upb_symtab* symtab_ptr = symtab ? symtab->ptr() : nullptr;
7130  return ParserPtr(upb_json_parser_create(
7131  arena->ptr(), method.ptr(), symtab_ptr, output.sink(), status->ptr(),
7133  }
7134 
7135  BytesSink input() { return upb_json_parser_input(ptr_); }
7136 
7137  private:
7138  upb_json_parser* ptr_;
7139 };
7140 
7141 #endif /* __cplusplus */
7142 
7143 /* upb_json_codecache *********************************************************/
7144 
7145 /* Lazily builds and caches decoder methods that will push data to the given
7146  * handlers. The upb_symtab object(s) must outlive this object. */
7147 
7148 struct upb_json_codecache;
7150 
7151 #ifdef __cplusplus
7152 extern "C" {
7153 #endif
7154 
7158  const upb_msgdef* md);
7159 
7160 #ifdef __cplusplus
7161 } /* extern "C" */
7162 
7163 class upb::json::CodeCache {
7164  public:
7165  CodeCache() : ptr_(upb_json_codecache_new(), upb_json_codecache_free) {}
7166 
7167  /* Returns a DecoderMethod that can push data to the given handlers.
7168  * If a suitable method already exists, it will be returned from the cache. */
7169  ParserMethodPtr Get(MessageDefPtr md) {
7170  return upb_json_codecache_get(ptr_.get(), md.ptr());
7171  }
7172 
7173  private:
7174  std::unique_ptr<upb_json_codecache, decltype(&upb_json_codecache_free)> ptr_;
7175 };
7176 
7177 #endif
7178 
7179 #endif /* UPB_JSON_PARSER_H_ */
7180 /*
7181 ** upb::json::Printer
7182 **
7183 ** Handlers that emit JSON according to a specific protobuf schema.
7184 */
7185 
7186 #ifndef UPB_JSON_TYPED_PRINTER_H_
7187 #define UPB_JSON_TYPED_PRINTER_H_
7188 
7189 
7190 #ifdef __cplusplus
7191 namespace upb {
7192 namespace json {
7193 class PrinterPtr;
7194 } /* namespace json */
7195 } /* namespace upb */
7196 #endif
7197 
7198 /* upb_json_printer ***********************************************************/
7199 
7200 #define UPB_JSON_PRINTER_SIZE 192
7201 
7202 struct upb_json_printer;
7204 
7205 #ifdef __cplusplus
7206 extern "C" {
7207 #endif
7208 
7209 /* Native C API. */
7214  bool preserve_fieldnames,
7215  const void *owner);
7216 
7217 /* Lazily builds and caches handlers that will push encoded data to a bytessink.
7218  * Any msgdef objects used with this object must outlive it. */
7219 upb_handlercache *upb_json_printer_newcache(bool preserve_proto_fieldnames);
7220 
7221 #ifdef __cplusplus
7222 } /* extern "C" */
7223 
7224 /* Prints an incoming stream of data to a BytesSink in JSON format. */
7225 class upb::json::PrinterPtr {
7226  public:
7227  PrinterPtr(upb_json_printer* ptr) : ptr_(ptr) {}
7228 
7229  static PrinterPtr Create(Arena *arena, const upb::Handlers *handlers,
7230  BytesSink output) {
7231  return PrinterPtr(
7232  upb_json_printer_create(arena->ptr(), handlers, output.sink()));
7233  }
7234 
7235  /* The input to the printer. */
7236  Sink input() { return upb_json_printer_input(ptr_); }
7237 
7238  static const size_t kSize = UPB_JSON_PRINTER_SIZE;
7239 
7240  static HandlerCache NewCache(bool preserve_proto_fieldnames) {
7241  return upb_json_printer_newcache(preserve_proto_fieldnames);
7242  }
7243 
7244  private:
7245  upb_json_printer* ptr_;
7246 };
7247 
7248 #endif /* __cplusplus */
7249 
7250 #endif /* UPB_JSON_TYPED_PRINTER_H_ */
7251 
7252 #undef UPB_SIZE
7253 #undef UPB_FIELD_AT
7254 #undef UPB_READ_ONEOF
7255 #undef UPB_WRITE_ONEOF
google_protobuf_ServiceOptions_msginit
const upb_msglayout google_protobuf_ServiceOptions_msginit
Definition: php/ext/google/protobuf/upb.c:395
upb_inttable_compact2
void upb_inttable_compact2(upb_inttable *t, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:5238
upb_double_handlerfunc
bool upb_double_handlerfunc(void *c, const void *hd, double val)
Definition: php/ext/google/protobuf/upb.h:4139
google_protobuf_DescriptorProto_oneof_decl
const UPB_INLINE google_protobuf_OneofDescriptorProto *const * google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1248
google_protobuf_MessageOptions_new
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2005
upb_vdecode_fast
UPB_INLINE upb_decoderet upb_vdecode_fast(const char *p)
Definition: php/ext/google/protobuf/upb.h:6829
google_protobuf_MessageOptions_set_no_standard_descriptor_accessor
UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2031
google_protobuf_FieldDescriptorProto_parse
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1481
google_protobuf_OneofDescriptorProto
struct google_protobuf_OneofDescriptorProto google_protobuf_OneofDescriptorProto
Definition: php/ext/google/protobuf/upb.h:938
upb_inttable_next
void upb_inttable_next(upb_inttable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5316
upb_array_set
bool upb_array_set(upb_array *arr, size_t i, upb_msgval val)
Definition: php/ext/google/protobuf/upb.c:4126
google_protobuf_FileOptions_serialize
UPB_INLINE char * google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1874
upb_pb_encoder_create
upb_pb_encoder * upb_pb_encoder_create(upb_arena *a, const upb_handlers *h, upb_bytessink output)
Definition: php/ext/google/protobuf/upb.c:8329
upb_msg_field_begin
void upb_msg_field_begin(upb_msg_field_iter *iter, const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1823
upb_msgdef_ntooz
const UPB_INLINE upb_oneofdef * upb_msgdef_ntooz(const upb_msgdef *m, const char *name)
Definition: php/ext/google/protobuf/upb.h:3513
google_protobuf_FileOptions_has_java_package
UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1878
upb_strdup2
char * upb_strdup2(const char *s, size_t len, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4679
google_protobuf_EnumDescriptorProto_new
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1602
upb_filedef_phpprefix
const char * upb_filedef_phpprefix(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2704
google_protobuf_DescriptorProto_ExtensionRange_set_start
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1393
table
upb_strtable table
Definition: php/ext/google/protobuf/protobuf.h:1065
google_protobuf_DescriptorProto
struct google_protobuf_DescriptorProto google_protobuf_DescriptorProto
Definition: php/ext/google/protobuf/upb.h:933
google_protobuf_DescriptorProto_ExtensionRange
struct google_protobuf_DescriptorProto_ExtensionRange google_protobuf_DescriptorProto_ExtensionRange
Definition: php/ext/google/protobuf/upb.h:934
upb_status_seterrmsg
void upb_status_seterrmsg(upb_status *status, const char *msg)
Definition: php/ext/google/protobuf/upb.c:5577
UPB_SYNTAX_PROTO2
@ UPB_SYNTAX_PROTO2
Definition: php/ext/google/protobuf/upb.h:3140
google_protobuf_FieldDescriptorProto_Label
google_protobuf_FieldDescriptorProto_Label
Definition: php/ext/google/protobuf/upb.h:988
google_protobuf_FieldOptions_JS_NUMBER
@ google_protobuf_FieldOptions_JS_NUMBER
Definition: php/ext/google/protobuf/upb.h:1024
google_protobuf_FileOptions_has_swift_prefix
UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1906
upb_pbcodecache_free
void upb_pbcodecache_free(upb_pbcodecache *c)
Definition: php/ext/google/protobuf/upb.c:6681
google_protobuf_EnumOptions_allow_alias
UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2171
upb_json_codecache
Definition: php/ext/google/protobuf/upb.c:9063
google_protobuf_FileDescriptorProto_public_dependency
UPB_INLINE int32_t const * google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1098
google_protobuf_FileOptions_go_package
UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1887
OP_POP
@ OP_POP
Definition: php/ext/google/protobuf/upb.h:6473
upb_int32_handlerfunc
bool upb_int32_handlerfunc(void *c, const void *hd, int32_t val)
Definition: php/ext/google/protobuf/upb.h:4134
upb_handlercache_free
void upb_handlercache_free(upb_handlercache *cache)
Definition: php/ext/google/protobuf/upb.c:3714
google_protobuf_GeneratedCodeInfo_Annotation_begin
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
Definition: php/ext/google/protobuf/upb.h:2554
upb_msgval::i32
int32_t i32
Definition: php/ext/google/protobuf/upb.h:569
google_protobuf_FileDescriptorProto_resize_extension
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1163
init
WEPOLL_INTERNAL int init(void)
Definition: wepoll.c:858
UPB_DESCRIPTOR_TYPE_UINT64
@ UPB_DESCRIPTOR_TYPE_UINT64
Definition: php/ext/google/protobuf/upb.h:440
Json::UInt64
unsigned long long int UInt64
Definition: json.h:241
upb_selector_t
int32_t upb_selector_t
Definition: php/ext/google/protobuf/upb.h:4062
google_protobuf_FieldOptions_has_deprecated
UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2076
upb_symtab_lookupfile
const upb_filedef * upb_symtab_lookupfile(const upb_symtab *s, const char *name)
Definition: php/ext/google/protobuf/upb.c:2784
upb_strtable_insert3
bool upb_strtable_insert3(upb_strtable *t, const char *key, size_t len, upb_value val, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4961
UPB_HANDLER_INT64
@ UPB_HANDLER_INT64
Definition: php/ext/google/protobuf/upb.h:4037
UPB_UNUSED
#define UPB_UNUSED(var)
Definition: php/ext/google/protobuf/upb.h:141
name
GLuint const GLchar * name
Definition: glcorearb.h:3055
UPB_HANDLER_ENDSEQ
@ UPB_HANDLER_ENDSEQ
Definition: php/ext/google/protobuf/upb.h:4049
google::protobuf::python::cdescriptor_pool::FindOneofByName
PyObject * FindOneofByName(PyDescriptorPool *self, PyObject *arg)
Definition: descriptor_pool.cc:339
google_protobuf_OneofDescriptorProto_set_name
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1581
google_protobuf_EnumValueDescriptorProto_new
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1708
google_protobuf_GeneratedCodeInfo_Annotation_path
UPB_INLINE int32_t const * google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2550
google_protobuf_SourceCodeInfo
struct google_protobuf_SourceCodeInfo google_protobuf_SourceCodeInfo
Definition: php/ext/google/protobuf/upb.h:954
upb_strtable_remove
UPB_INLINE bool upb_strtable_remove(upb_strtable *t, const char *key, upb_value *v)
Definition: php/ext/google/protobuf/upb.h:2957
google_protobuf_SourceCodeInfo_Location_path
UPB_INLINE int32_t const * google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2457
google_protobuf_FieldDescriptorProto_TYPE_FIXED64
@ google_protobuf_FieldDescriptorProto_TYPE_FIXED64
Definition: php/ext/google/protobuf/upb.h:1000
google_protobuf_EnumValueOptions_serialize
UPB_INLINE char * google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2209
UPB_CTYPE_UINT32
@ UPB_CTYPE_UINT32
Definition: php/ext/google/protobuf/upb.h:2645
google_protobuf_DescriptorProto_resize_reserved_range
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange ** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1350
google_protobuf_DescriptorProto_add_oneof_decl
UPB_INLINE struct google_protobuf_OneofDescriptorProto * google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1340
google_protobuf_MethodDescriptorProto_has_client_streaming
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1824
google_protobuf_EnumDescriptorProto_mutable_reserved_range
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange ** google_protobuf_EnumDescriptorProto_mutable_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1652
google_protobuf_EnumValueOptions_set_deprecated
UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2217
upb_handlers_tabent
Definition: php/ext/google/protobuf/upb.h:4632
data_
StringPiece data_
Definition: bytestream_unittest.cc:60
google_protobuf_FileOptions_OptimizeMode
google_protobuf_FileOptions_OptimizeMode
Definition: php/ext/google/protobuf/upb.h:1027
upb_arena
Definition: php/ext/google/protobuf/upb.c:5623
google_protobuf_FileOptions_set_py_generic_services
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1944
upb_arena
struct upb_arena upb_arena
Definition: php/ext/google/protobuf/upb.h:303
upb_fielddef_containingtype
const upb_msgdef * upb_fielddef_containingtype(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1615
google_protobuf_UninterpretedOption_has_positive_int_value
UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2333
upb_json_codecache
struct upb_json_codecache upb_json_codecache
Definition: php/ext/google/protobuf/upb.h:7149
upb_inttable_insertptr
UPB_INLINE bool upb_inttable_insertptr(upb_inttable *t, const void *key, upb_value val)
Definition: php/ext/google/protobuf/upb.h:2983
upb_msglayout_field::offset
uint16_t offset
Definition: php/ext/google/protobuf/upb.h:516
OP_SETDELIM
@ OP_SETDELIM
Definition: php/ext/google/protobuf/upb.h:6474
google_protobuf_FieldOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2110
upb_array_size
size_t upb_array_size(const upb_array *arr)
Definition: php/ext/google/protobuf/upb.c:4113
upb_startfield_handlerfunc
void * upb_startfield_handlerfunc(void *c, const void *hd)
Definition: php/ext/google/protobuf/upb.h:4132
google_protobuf_FileOptions_new
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1866
google_protobuf_FileDescriptorSet_add_file
UPB_INLINE struct google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1062
upb_pbdecoder::callstack
const uint32_t ** callstack
Definition: php/ext/google/protobuf/upb.h:6641
upb_zzdec_32
UPB_INLINE int32_t upb_zzdec_32(uint32_t n)
Definition: php/ext/google/protobuf/upb.h:6775
upb_value_setfloat
UPB_INLINE void upb_value_setfloat(upb_value *val, float cval)
Definition: php/ext/google/protobuf/upb.h:2728
upb_def_init::filename
const char * filename
Definition: php/ext/google/protobuf/upb.h:3939
google_protobuf_FieldDescriptorProto_Type
google_protobuf_FieldDescriptorProto_Type
Definition: php/ext/google/protobuf/upb.h:994
google_protobuf_ExtensionRangeOptions_parse
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1450
upb_msgdef_lookupname
bool upb_msgdef_lookupname(const upb_msgdef *m, const char *name, size_t len, const upb_fielddef **f, const upb_oneofdef **o)
Definition: php/ext/google/protobuf/upb.c:1785
upb_json_printer_newcache
upb_handlercache * upb_json_printer_newcache(bool preserve_proto_fieldnames)
Definition: php/ext/google/protobuf/upb.c:13621
upb_func
void upb_func()
Definition: php/ext/google/protobuf/upb.h:395
UPB_DESCRIPTOR_TYPE_FIXED32
@ UPB_DESCRIPTOR_TYPE_FIXED32
Definition: php/ext/google/protobuf/upb.h:443
google_protobuf_FileDescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_FileOptions * google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1177
google_protobuf_EnumDescriptorProto_add_reserved_name
UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_strview val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1671
upb_array_type
upb_fieldtype_t upb_array_type(const upb_array *arr)
Definition: php/ext/google/protobuf/upb.c:4117
google_protobuf_EnumDescriptorProto_mutable_reserved_name
UPB_INLINE upb_strview * google_protobuf_EnumDescriptorProto_mutable_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1665
UPB_HANDLER_STARTSUBMSG
@ UPB_HANDLER_STARTSUBMSG
Definition: php/ext/google/protobuf/upb.h:4046
google_protobuf_FieldDescriptorProto_has_number
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1494
upb_msglayout::fields
const upb_msglayout_field * fields
Definition: php/ext/google/protobuf/upb.h:525
google_protobuf_FieldDescriptorProto_LABEL_REQUIRED
@ google_protobuf_FieldDescriptorProto_LABEL_REQUIRED
Definition: php/ext/google/protobuf/upb.h:990
upb_msg_getscalarhandlerdata
bool upb_msg_getscalarhandlerdata(const upb_handlers *h, upb_selector_t s, upb_fieldtype_t *type, size_t *offset, int32_t *hasbit)
Definition: php/ext/google/protobuf/upb.c:3810
google_protobuf_EnumValueOptions_msginit
const upb_msglayout google_protobuf_EnumValueOptions_msginit
Definition: php/ext/google/protobuf/upb.c:380
google_protobuf_UninterpretedOption_NamePart_serialize
UPB_INLINE char * google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2393
benchmarks.python.py_benchmark.const
const
Definition: py_benchmark.py:14
upb_desctype_to_fieldtype
const uint8_t upb_desctype_to_fieldtype[]
Definition: php/ext/google/protobuf/upb.c:508
google_protobuf_DescriptorProto_ReservedRange_set_end
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1439
UPB_DESCRIPTOR_TYPE_FIXED64
@ UPB_DESCRIPTOR_TYPE_FIXED64
Definition: php/ext/google/protobuf/upb.h:442
google_protobuf_DescriptorProto_ReservedRange_msginit
const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit
Definition: php/ext/google/protobuf/upb.c:130
upb_pbcodecache::arena
upb_arena * arena
Definition: php/ext/google/protobuf/upb.h:6505
google_protobuf_DescriptorProto_ExtensionRange_set_options
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions *value)
Definition: php/ext/google/protobuf/upb.h:1401
google_protobuf_MessageOptions_set_map_entry
UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2039
upb_pbdecoder_freejit
void upb_pbdecoder_freejit(mgroup *group)
OP_TAGN
@ OP_TAGN
Definition: php/ext/google/protobuf/upb.h:6486
upb_msg_iter_oneof
const upb_oneofdef * upb_msg_iter_oneof(const upb_msg_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1867
Map
Definition: ruby/ext/google/protobuf_c/protobuf.h:442
google_protobuf_FileDescriptorProto_dependency
UPB_INLINE upb_strview const * google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1089
google_protobuf_MethodOptions
struct google_protobuf_MethodOptions google_protobuf_MethodOptions
Definition: php/ext/google/protobuf/upb.h:951
google_protobuf_GeneratedCodeInfo_parse
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2510
upb_inttable_begin
void upb_inttable_begin(upb_inttable_iter *i, const upb_inttable *t)
Definition: php/ext/google/protobuf/upb.c:5309
upb_zzdec_64
UPB_INLINE int64_t upb_zzdec_64(uint64_t n)
Definition: php/ext/google/protobuf/upb.h:6778
google_protobuf_DescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_MessageOptions * google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1325
upb_value_float
UPB_INLINE upb_value upb_value_float(float cval)
Definition: php/ext/google/protobuf/upb.h:2738
upb_arena_free
void upb_arena_free(upb_arena *a)
Definition: php/ext/google/protobuf/upb.c:5762
UPB_DESCRIPTOR_TYPE_INT64
@ UPB_DESCRIPTOR_TYPE_INT64
Definition: php/ext/google/protobuf/upb.h:439
upb_msgval::u64
uint64_t u64
Definition: php/ext/google/protobuf/upb.h:572
upb_def_init::descriptor
upb_strview descriptor
Definition: php/ext/google/protobuf/upb.h:3940
UPB_WELLKNOWN_STRINGVALUE
@ UPB_WELLKNOWN_STRINGVALUE
Definition: php/ext/google/protobuf/upb.h:3162
upb_pbdecoder_method
const upb_pbdecodermethod * upb_pbdecoder_method(const upb_pbdecoder *d)
Definition: php/ext/google/protobuf/upb.c:7758
UPB_WELLKNOWN_UINT64VALUE
@ UPB_WELLKNOWN_UINT64VALUE
Definition: php/ext/google/protobuf/upb.h:3158
upb_json_parsermethod
Definition: php/ext/google/protobuf/upb.c:9068
upb_arena_new
UPB_INLINE upb_arena * upb_arena_new()
Definition: php/ext/google/protobuf/upb.h:330
google_protobuf_UninterpretedOption_has_string_value
UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2339
upb_status
Definition: php/ext/google/protobuf/upb.h:170
end
GLuint GLuint end
Definition: glcorearb.h:2858
upb_pbdecoder::stack
upb_pbdecoder_frame * stack
Definition: php/ext/google/protobuf/upb.h:6640
upb_pbdecoder_frame
Definition: php/ext/google/protobuf/upb.h:6548
UPB_CTYPE_FLOAT
@ UPB_CTYPE_FLOAT
Definition: php/ext/google/protobuf/upb.h:2652
google_protobuf_OneofDescriptorProto_name
UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1577
UPB_HANDLER_INT32
@ UPB_HANDLER_INT32
Definition: php/ext/google/protobuf/upb.h:4036
google_protobuf_UninterpretedOption_negative_int_value
UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2336
google_protobuf_FileDescriptorProto_add_weak_dependency
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1215
google_protobuf_UninterpretedOption_set_identifier_value
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:2357
google_protobuf_MethodDescriptorProto_server_streaming
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1827
google_protobuf_GeneratedCodeInfo_Annotation_new
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2538
upb_msgfactory_new
upb_msgfactory * upb_msgfactory_new(const upb_symtab *symtab)
Definition: php/ext/google/protobuf/upb.c:4548
google_protobuf_EnumValueDescriptorProto_serialize
UPB_INLINE char * google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1716
upb_msg_addunknown
void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len)
Definition: php/ext/google/protobuf/upb.c:3986
upb_strtable_packedsize
void upb_strtable_packedsize(const upb_strtable *t, size_t *size)
google_protobuf_FieldDescriptorProto_set_name
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1511
upb_msglayout::size
uint16_t size
Definition: php/ext/google/protobuf/upb.h:528
upb_pbdecoder_create
upb_pbdecoder * upb_pbdecoder_create(upb_arena *arena, const upb_pbdecodermethod *method, upb_sink output, upb_status *status)
Definition: php/ext/google/protobuf/upb.c:7717
google_protobuf_EnumDescriptorProto_options
const UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1618
google_protobuf_FileOptions_php_generic_services
UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1913
google_protobuf_FileDescriptorSet_file
const UPB_INLINE google_protobuf_FileDescriptorProto *const * google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1054
upb_msglayout_field::descriptortype
uint8_t descriptortype
Definition: php/ext/google/protobuf/upb.h:519
upb_msg_field_next
void upb_msg_field_next(upb_msg_field_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1827
google_protobuf_GeneratedCodeInfo_Annotation_has_begin
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
Definition: php/ext/google/protobuf/upb.h:2553
upb_json_printer
Definition: php/ext/google/protobuf/upb.c:12238
google_protobuf_ExtensionRangeOptions_serialize
UPB_INLINE char * google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1455
NULL
NULL
Definition: test_security_zap.cpp:405
OP_BRANCH
@ OP_BRANCH
Definition: php/ext/google/protobuf/upb.h:6481
google_protobuf_ServiceOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2264
google_protobuf_SourceCodeInfo_Location_leading_comments
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg)
Definition: php/ext/google/protobuf/upb.h:2460
Bool
Definition: gtest_pred_impl_unittest.cc:56
google_protobuf_UninterpretedOption_has_identifier_value
UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2331
google::protobuf::int64
int64_t int64
Definition: protobuf/src/google/protobuf/stubs/port.h:151
google_protobuf_FileDescriptorProto_name
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1086
google_protobuf_FieldDescriptorProto_TYPE_INT64
@ google_protobuf_FieldDescriptorProto_TYPE_INT64
Definition: php/ext/google/protobuf/upb.h:997
upb_pbdecodermethod::dispatch
upb_inttable dispatch
Definition: php/ext/google/protobuf/upb.h:6597
upb_msg_setscalarhandler
bool upb_msg_setscalarhandler(upb_handlers *h, const upb_fielddef *f, size_t offset, int32_t hasbit)
Definition: php/ext/google/protobuf/upb.c:3774
google_protobuf_FieldDescriptorProto_TYPE_UINT64
@ google_protobuf_FieldDescriptorProto_TYPE_UINT64
Definition: php/ext/google/protobuf/upb.h:998
upb_msgdef_file
const upb_filedef * upb_msgdef_file(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1737
upb_inttable_remove
bool upb_inttable_remove(upb_inttable *t, uintptr_t key, upb_value *val)
Definition: php/ext/google/protobuf/upb.c:5190
google_protobuf_MethodDescriptorProto_options
const UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1823
google_protobuf_FileDescriptorProto_set_syntax
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1219
upb_fielddef_enumsubdef
const upb_enumdef * upb_fielddef_enumsubdef(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1682
upb_msglayout
struct upb_msglayout upb_msglayout
google_protobuf_OneofDescriptorProto_has_name
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1576
upb_textprinter_create
upb_textprinter * upb_textprinter_create(upb_arena *arena, const upb_handlers *h, upb_bytessink output)
Definition: php/ext/google/protobuf/upb.c:8684
UPB_SIZE
#define UPB_SIZE(size32, size64)
Definition: php/ext/google/protobuf/upb.h:17
upb_inttable_iter::t
const upb_inttable * t
Definition: php/ext/google/protobuf/upb.h:3089
google_protobuf_MethodDescriptorProto_has_name
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1816
google_protobuf_MethodDescriptorProto_has_output_type
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1820
upb_strdup
char * upb_strdup(const char *s, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4675
google_protobuf_MethodOptions_deprecated
UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2288
google_protobuf_DescriptorProto_serialize
UPB_INLINE char * google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1235
google::protobuf::operator*
uint128 operator*(const uint128 &lhs, const uint128 &rhs)
Definition: int128.h:308
google_protobuf_FileDescriptorProto_mutable_public_dependency
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_mutable_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1199
google_protobuf_UninterpretedOption_NamePart_is_extension
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg)
Definition: php/ext/google/protobuf/upb.h:2400
length
GLenum GLuint GLenum GLsizei length
Definition: glcorearb.h:2695
UPB_HANDLER_DOUBLE
@ UPB_HANDLER_DOUBLE
Definition: php/ext/google/protobuf/upb.h:4041
UPB_WELLKNOWN_TIMESTAMP
@ UPB_WELLKNOWN_TIMESTAMP
Definition: php/ext/google/protobuf/upb.h:3153
OP_STARTSUBMSG
@ OP_STARTSUBMSG
Definition: php/ext/google/protobuf/upb.h:6465
UPB_PB_VARINT_MAX_LEN
#define UPB_PB_VARINT_MAX_LEN
Definition: php/ext/google/protobuf/upb.h:6755
google_protobuf_DescriptorProto_ExtensionRange_start
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg)
Definition: php/ext/google/protobuf/upb.h:1387
google_protobuf_GeneratedCodeInfo_Annotation_set_source_file
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:2568
input
std::string input
Definition: tokenizer_unittest.cc:197
upb_fielddef_defaultint32
int32_t upb_fielddef_defaultint32(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1633
upb_enum_begin
void upb_enum_begin(upb_enum_iter *iter, const upb_enumdef *e)
Definition: php/ext/google/protobuf/upb.c:1466
upb_pbcodecache_allowjit
bool upb_pbcodecache_allowjit(const upb_pbcodecache *c)
Definition: php/ext/google/protobuf/upb.c:6696
upb_value_size
UPB_INLINE int upb_value_size(uint64_t val)
Definition: php/ext/google/protobuf/upb.h:6839
google_protobuf_FileDescriptorProto_add_enum_type
UPB_INLINE struct google_protobuf_EnumDescriptorProto * google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1140
upb_symtab_new
upb_symtab * upb_symtab_new()
Definition: php/ext/google/protobuf/upb.c:2745
upb_pbdecoder_frame::end_ofs
uint64_t end_ofs
Definition: php/ext/google/protobuf/upb.h:6564
OP_TAG2
@ OP_TAG2
Definition: php/ext/google/protobuf/upb.h:6485
google_protobuf_EnumValueDescriptorProto_parse
UPB_INLINE google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1711
google_protobuf_FileOptions_set_csharp_namespace
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1968
upb_pbdecoder
Definition: php/ext/google/protobuf/upb.h:6600
google_protobuf_FileDescriptorProto_set_source_code_info
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo *value)
Definition: php/ext/google/protobuf/upb.h:1186
google_protobuf_FileOptions_msginit
const upb_msglayout google_protobuf_FileOptions_msginit
Definition: php/ext/google/protobuf/upb.c:297
google::protobuf::python::field_descriptor::GetJsonName
static PyObject * GetJsonName(PyBaseDescriptor *self, void *closure)
Definition: python/google/protobuf/pyext/descriptor.cc:757
upb_symtab_lookupmsg2
const upb_msgdef * upb_symtab_lookupmsg2(const upb_symtab *s, const char *sym, size_t len)
Definition: php/ext/google/protobuf/upb.c:2771
upb_json_printer_create
upb_json_printer * upb_json_printer_create(upb_arena *a, const upb_handlers *h, upb_bytessink output)
Definition: php/ext/google/protobuf/upb.c:13596
google_protobuf_DescriptorProto_ReservedRange_set_start
UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1435
google_protobuf_GeneratedCodeInfo_mutable_annotation
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation ** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2521
upb_handlers_setstartmsg
bool upb_handlers_setstartmsg(upb_handlers *h, upb_startmsg_handlerfunc *func, const upb_handlerattr *attr)
Definition: php/ext/google/protobuf/upb.c:3490
upb_value
Definition: php/ext/google/protobuf/upb.h:2656
google_protobuf_UninterpretedOption_positive_int_value
UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2334
upb_def_init
Definition: php/ext/google/protobuf/upb.h:3937
upb_decode
bool upb_decode(const char *buf, size_t size, upb_msg *msg, const upb_msglayout *l)
Definition: php/ext/google/protobuf/upb.c:1088
google_protobuf_UninterpretedOption_has_negative_int_value
UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2335
upb_msgdef_isnumberwrapper
bool upb_msgdef_isnumberwrapper(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1817
google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1691
google_protobuf_UninterpretedOption_msginit
const upb_msglayout google_protobuf_UninterpretedOption_msginit
Definition: php/ext/google/protobuf/upb.c:431
google_protobuf_FileDescriptorProto_new
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1073
upb_strtable_uninit2
void upb_strtable_uninit2(upb_strtable *table, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4932
upb_pbdecodermethod::ofs
uint32_t ofs
Definition: php/ext/google/protobuf/upb.h:6578
upb_fielddef_defaultint64
int64_t upb_fielddef_defaultint64(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1628
s
XmlRpcServer s
google_protobuf_MethodDescriptorProto_set_output_type
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1837
upb_handlers_setstartseq
bool upb_handlers_setstartseq(upb_handlers *h, const upb_fielddef *f, upb_startfield_handlerfunc *func, const upb_handlerattr *attr)
upb_msgdef_ntoo
const upb_oneofdef * upb_msgdef_ntoo(const upb_msgdef *m, const char *name, size_t len)
Definition: php/ext/google/protobuf/upb.c:1774
google_protobuf_MessageOptions_serialize
UPB_INLINE char * google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2013
google_protobuf_GeneratedCodeInfo_annotation
const UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *const * google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2519
google_protobuf_FileOptions_set_java_multiple_files
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1928
upb_oneofdef_ntofz
const UPB_INLINE upb_fielddef * upb_oneofdef_ntofz(const upb_oneofdef *o, const char *name)
Definition: php/ext/google/protobuf/upb.h:3366
UPB_TYPE_INT32
@ UPB_TYPE_INT32
Definition: php/ext/google/protobuf/upb.h:415
upb_pbdecodermethod::input_handler_
upb_byteshandler input_handler_
Definition: php/ext/google/protobuf/upb.h:6589
google_protobuf_EnumDescriptorProto_add_reserved_range
UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1658
google_protobuf_DescriptorProto_mutable_reserved_range
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange ** google_protobuf_DescriptorProto_mutable_reserved_range(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1347
google_protobuf_FieldDescriptorProto_set_extendee
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1515
google_protobuf_FieldDescriptorProto_new
UPB_INLINE google_protobuf_FieldDescriptorProto * google_protobuf_FieldDescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1478
google_protobuf_DescriptorProto_ReservedRange_parse
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1421
upb_pbdecoder_seterr
void upb_pbdecoder_seterr(upb_pbdecoder *d, const char *msg)
Definition: php/ext/google/protobuf/upb.c:6829
google_protobuf_EnumDescriptorProto_EnumReservedRange_new
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1679
google_protobuf_EnumDescriptorProto_resize_reserved_name
UPB_INLINE upb_strview * google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1668
UPB_DESCRIPTOR_TYPE_SFIXED32
@ UPB_DESCRIPTOR_TYPE_SFIXED32
Definition: php/ext/google/protobuf/upb.h:451
upb_handlers_setendstr
bool upb_handlers_setendstr(upb_handlers *h, const upb_fielddef *f, upb_endfield_handlerfunc *func, const upb_handlerattr *attr)
upb_msg_oneof_iter_isequal
bool upb_msg_oneof_iter_isequal(const upb_msg_oneof_iter *iter1, const upb_msg_oneof_iter *iter2)
Definition: php/ext/google/protobuf/upb.c:1875
upb_vdecode_max8_branch64
upb_decoderet upb_vdecode_max8_branch64(upb_decoderet r)
Definition: php/ext/google/protobuf/upb.c:8758
upb_fielddef_fullname
const char * upb_fielddef_fullname(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1501
google::protobuf::python::descriptor::Get
static PyObject * Get(PyContainer *self, PyObject *args)
Definition: descriptor_containers.cc:455
upb_fielddef_index
uint32_t upb_fielddef_index(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1544
upb_fielddef_descriptortype
upb_descriptortype_t upb_fielddef_descriptortype(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1540
google_protobuf_DescriptorProto_ReservedRange_end
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1433
upb_pbdecoder_setmaxnesting
bool upb_pbdecoder_setmaxnesting(upb_pbdecoder *d, size_t max)
Definition: php/ext/google/protobuf/upb.c:7770
google_protobuf_FileDescriptorProto_weak_dependency
UPB_INLINE int32_t const * google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1099
label
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:4316
google_protobuf_EnumValueOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2221
google_protobuf_FieldDescriptorProto_has_default_value
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1502
google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end
UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1693
upb_oneofdef_itof
const upb_fielddef * upb_oneofdef_itof(const upb_oneofdef *o, uint32_t num)
Definition: php/ext/google/protobuf/upb.c:1905
google_protobuf_FieldOptions_JS_NORMAL
@ google_protobuf_FieldOptions_JS_NORMAL
Definition: php/ext/google/protobuf/upb.h:1022
google_protobuf_MessageOptions_has_message_set_wire_format
UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2017
upb_msgval::arr
const upb_array * arr
Definition: php/ext/google/protobuf/upb.h:575
google_protobuf_FieldDescriptorProto_msginit
const upb_msglayout google_protobuf_FieldDescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:167
UPB_FIELD_AT
#define UPB_FIELD_AT(msg, fieldtype, offset)
Definition: php/ext/google/protobuf/upb.h:20
upb_endfield_handlerfunc
bool upb_endfield_handlerfunc(void *c, const void *hd)
Definition: php/ext/google/protobuf/upb.h:4133
google::protobuf::uint32
uint32_t uint32
Definition: protobuf/src/google/protobuf/stubs/port.h:155
UPB_DESCRIPTOR_TYPE_FLOAT
@ UPB_DESCRIPTOR_TYPE_FLOAT
Definition: php/ext/google/protobuf/upb.h:438
google_protobuf_EnumValueOptions
struct google_protobuf_EnumValueOptions google_protobuf_EnumValueOptions
Definition: php/ext/google/protobuf/upb.h:949
google_protobuf_EnumOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2190
google_protobuf_MethodOptions_idempotency_level
UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2290
google_protobuf_ServiceDescriptorProto_add_method
UPB_INLINE struct google_protobuf_MethodDescriptorProto * google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1780
google_protobuf_FileOptions_has_deprecated
UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1896
upb_oneof_iter_isequal
bool upb_oneof_iter_isequal(const upb_oneof_iter *iter1, const upb_oneof_iter *iter2)
upb_pbdecoder_decode_f64
int32_t upb_pbdecoder_decode_f64(upb_pbdecoder *d, uint64_t *u64)
Definition: php/ext/google/protobuf/upb.c:7208
google::protobuf::compiler::annotation_test_util::AddFile
void AddFile(const std::string &filename, const std::string &data)
Definition: annotation_test_util.cc:72
google_protobuf_MethodOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2291
UPB_CTYPE_CSTR
@ UPB_CTYPE_CSTR
Definition: php/ext/google/protobuf/upb.h:2648
google_protobuf_FileOptions_set_java_package
UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1916
google_protobuf_FieldDescriptorProto_TYPE_MESSAGE
@ google_protobuf_FieldDescriptorProto_TYPE_MESSAGE
Definition: php/ext/google/protobuf/upb.h:1005
google_protobuf_DescriptorProto_ReservedRange_serialize
UPB_INLINE char * google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1426
upb_inttable_init
UPB_INLINE bool upb_inttable_init(upb_inttable *table, upb_ctype_t ctype)
Definition: php/ext/google/protobuf/upb.h:2876
google_protobuf_MethodDescriptorProto_set_client_streaming
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1854
upb_fielddef_defaultuint32
uint32_t upb_fielddef_defaultuint32(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1643
upb_pbcodecache::lazy
bool lazy
Definition: php/ext/google/protobuf/upb.h:6508
upb_strtable_iter_key
const char * upb_strtable_iter_key(const upb_strtable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5024
google_protobuf_EnumOptions_serialize
UPB_INLINE char * google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2166
upb_pbdecoder::handle
const upb_bufhandle * handle
Definition: php/ext/google/protobuf/upb.h:6637
google_protobuf_FileOptions_csharp_namespace
UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1905
google_protobuf_DescriptorProto_ReservedRange_has_start
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1430
google_protobuf_FieldDescriptorProto_extendee
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1493
upb_tabent
struct _upb_tabent upb_tabent
upb_mapiter_free
void upb_mapiter_free(upb_mapiter *i, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4321
_upb_array_resize_accessor
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)
Definition: php/ext/google/protobuf/upb.h:796
google_protobuf_MessageOptions_msginit
const upb_msglayout google_protobuf_MessageOptions_msginit
Definition: php/ext/google/protobuf/upb.c:315
upb_fielddef_number
uint32_t upb_fielddef_number(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1552
OP_ENDSEQ
@ OP_ENDSEQ
Definition: php/ext/google/protobuf/upb.h:6464
upb_handlercache
struct upb_handlercache upb_handlercache
Definition: php/ext/google/protobuf/upb.h:4595
google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1696
upb_filedef_enum
const upb_enumdef * upb_filedef_enum(const upb_filedef *f, int i)
Definition: php/ext/google/protobuf/upb.c:2736
google_protobuf_GeneratedCodeInfo_Annotation_has_source_file
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
Definition: php/ext/google/protobuf/upb.h:2551
upb_msgfactory
Definition: php/ext/google/protobuf/upb.c:4543
google_protobuf_FileDescriptorProto_mutable_message_type
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1121
UPB_ASSERT
#define UPB_ASSERT(expr)
Definition: php/ext/google/protobuf/upb.h:146
google_protobuf_FileDescriptorProto_set_package
UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1107
google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments
UPB_INLINE upb_strview * google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2496
google_protobuf_FieldDescriptorProto_TYPE_SINT64
@ google_protobuf_FieldDescriptorProto_TYPE_SINT64
Definition: php/ext/google/protobuf/upb.h:1012
upb_inttable_packedsize
void upb_inttable_packedsize(const upb_inttable *t, size_t *size)
google_protobuf_FileDescriptorSet_serialize
UPB_INLINE char * google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1050
google_protobuf_EnumValueOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2215
google_protobuf_DescriptorProto_options
const UPB_INLINE google_protobuf_MessageOptions * google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1247
google_protobuf_FileDescriptorProto_enum_type
const UPB_INLINE google_protobuf_EnumDescriptorProto *const * google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1091
upb_fielddef_label
upb_label_t upb_fielddef_label(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1548
google_protobuf_FieldDescriptorProto_options
const UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1505
upb_int64_handlerfunc
bool upb_int64_handlerfunc(void *c, const void *hd, int64_t val)
Definition: php/ext/google/protobuf/upb.h:4135
google_protobuf_DescriptorProto_resize_extension
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1311
UPB_UNKNOWN_SELECTOR
#define UPB_UNKNOWN_SELECTOR
Definition: php/ext/google/protobuf/upb.h:4067
upb_def_init::deps
struct upb_def_init ** deps
Definition: php/ext/google/protobuf/upb.h:3938
upb_strtable_init
UPB_INLINE bool upb_strtable_init(upb_strtable *table, upb_ctype_t ctype)
Definition: php/ext/google/protobuf/upb.h:2880
upb_handlers_addcleanup
bool upb_handlers_addcleanup(upb_handlers *h, void *p, upb_handlerfree *hfree)
Definition: php/ext/google/protobuf/upb.c:3545
google_protobuf_FieldOptions_CType
google_protobuf_FieldOptions_CType
Definition: php/ext/google/protobuf/upb.h:1015
google_protobuf_FieldDescriptorProto_set_label
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1523
upb_filedef_enumcount
int upb_filedef_enumcount(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2724
upb_enum_iter_number
int32_t upb_enum_iter_number(upb_enum_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1494
google_protobuf_ServiceOptions_set_deprecated
UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2254
google_protobuf_GeneratedCodeInfo_serialize
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2515
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
google_protobuf_FileDescriptorProto_extension
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1093
google_protobuf_DescriptorProto_ReservedRange_has_end
UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1432
upb_oneof_done
bool upb_oneof_done(upb_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1919
google_protobuf_DescriptorProto_extension
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1245
upb_vencode64
UPB_INLINE size_t upb_vencode64(uint64_t val, char *buf)
Definition: php/ext/google/protobuf/upb.h:6854
google_protobuf_FieldOptions_deprecated
UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2077
upb_pbdecoder::end
const char * end
Definition: php/ext/google/protobuf/upb.h:6613
upb_sink_putstring
UPB_INLINE size_t upb_sink_putstring(upb_sink s, upb_selector_t sel, const char *buf, size_t n, const upb_bufhandle *handle)
Definition: php/ext/google/protobuf/upb.h:5704
UPB_MAX
#define UPB_MAX(x, y)
Definition: php/ext/google/protobuf/upb.h:138
upb_strtable_next
void upb_strtable_next(upb_strtable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5014
upb_oneofdef_index
uint32_t upb_oneofdef_index(const upb_oneofdef *o)
Definition: php/ext/google/protobuf/upb.c:1894
google_protobuf_SourceCodeInfo_Location_has_leading_comments
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg)
Definition: php/ext/google/protobuf/upb.h:2459
if
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END if(!upb_strtable_init(&intern->table, UPB_CTYPE_UINT64))
Definition: php/ext/google/protobuf/map.c:232
H
#define H(n)
Definition: sha1.c:52
upb_inttable_init2
bool upb_inttable_init2(upb_inttable *table, upb_ctype_t ctype, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:5124
google_protobuf_FieldOptions_has_packed
UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2074
google_protobuf_MethodOptions_IdempotencyLevel
google_protobuf_MethodOptions_IdempotencyLevel
Definition: php/ext/google/protobuf/upb.h:1033
google_protobuf_FieldOptions_new
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2060
google_protobuf_ServiceDescriptorProto_name
UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1765
google_protobuf_EnumDescriptorProto_set_name
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1622
upb_inttable::t
upb_table t
Definition: php/ext/google/protobuf/upb.h:2824
google_protobuf_FileOptions_has_php_namespace
UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1910
google_protobuf_EnumOptions_has_deprecated
UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2172
google_protobuf_EnumDescriptorProto_parse
UPB_INLINE google_protobuf_EnumDescriptorProto * google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1605
upb_msgdef_numoneofs
int upb_msgdef_numoneofs(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1804
upb_decoderet::p
const char * p
Definition: php/ext/google/protobuf/upb.h:6788
google_protobuf_MethodOptions_has_idempotency_level
UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2289
google_protobuf_ServiceDescriptorProto_resize_method
UPB_INLINE google_protobuf_MethodDescriptorProto ** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1777
getop
UPB_INLINE opcode getop(uint32_t instr)
Definition: php/ext/google/protobuf/upb.h:6502
OP_DISPATCH
@ OP_DISPATCH
Definition: php/ext/google/protobuf/upb.h:6495
google_protobuf_FieldOptions_CORD
@ google_protobuf_FieldOptions_CORD
Definition: php/ext/google/protobuf/upb.h:1017
upb_inttable_lookup
bool upb_inttable_lookup(const upb_inttable *t, uintptr_t key, upb_value *v)
Definition: php/ext/google/protobuf/upb.c:5176
upb_inttable::array
const upb_tabval * array
Definition: php/ext/google/protobuf/upb.h:2825
google_protobuf_SourceCodeInfo_Location_set_trailing_comments
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:2489
google_protobuf_MessageOptions_set_deprecated
UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2035
upb_inttable_push2
bool upb_inttable_push2(upb_inttable *t, upb_value val, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:5211
upb_handlers_setbool
bool upb_handlers_setbool(upb_handlers *h, const upb_fielddef *f, upb_bool_handlerfunc *func, const upb_handlerattr *attr)
google_protobuf_FileOptions_has_java_outer_classname
UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1880
upb_enum_next
void upb_enum_next(upb_enum_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1471
UPB_CTYPE_INT32
@ UPB_CTYPE_INT32
Definition: php/ext/google/protobuf/upb.h:2643
google_protobuf_MethodOptions_has_deprecated
UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2287
upb_handlers_getselector
bool upb_handlers_getselector(const upb_fielddef *f, upb_handlertype_t type, upb_selector_t *s)
Definition: php/ext/google/protobuf/upb.c:3563
upb_inttable_lookup32
UPB_INLINE bool upb_inttable_lookup32(const upb_inttable *t, uint32_t key, upb_value *v)
Definition: php/ext/google/protobuf/upb.h:2999
upb_intkey
UPB_INLINE uintptr_t upb_intkey(uintptr_t key)
Definition: php/ext/google/protobuf/upb.h:2853
upb_strview::data
const char * data
Definition: php/ext/google/protobuf/upb.h:536
google_protobuf_MessageOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2046
upb_pbdecodermethod_isnative
bool upb_pbdecodermethod_isnative(const upb_pbdecodermethod *m)
Definition: php/ext/google/protobuf/upb.c:5849
UPB_LABEL_OPTIONAL
@ UPB_LABEL_OPTIONAL
Definition: php/ext/google/protobuf/upb.h:430
UPB_TYPE_FLOAT
@ UPB_TYPE_FLOAT
Definition: php/ext/google/protobuf/upb.h:414
upb_strtable_done
bool upb_strtable_done(const upb_strtable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5018
google_protobuf_EnumDescriptorProto_EnumReservedRange_start
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1692
map
zval * map
Definition: php/ext/google/protobuf/encode_decode.c:473
google_protobuf_FieldDescriptorProto_serialize
UPB_INLINE char * google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1486
google_protobuf_FieldOptions_STRING
@ google_protobuf_FieldOptions_STRING
Definition: php/ext/google/protobuf/upb.h:1016
upb_symtab_lookupenum
const upb_enumdef * upb_symtab_lookupenum(const upb_symtab *s, const char *sym)
Definition: php/ext/google/protobuf/upb.c:2778
upb_msglayout_field::submsg_index
uint16_t submsg_index
Definition: php/ext/google/protobuf/upb.h:518
dispatch
static int32_t dispatch(upb_pbdecoder *d)
Definition: php/ext/google/protobuf/upb.c:7343
UPB_CTYPE_UINT64
@ UPB_CTYPE_UINT64
Definition: php/ext/google/protobuf/upb.h:2646
upb_pbdecoder::method_
const upb_pbdecodermethod * method_
Definition: php/ext/google/protobuf/upb.h:6607
testing::internal::Int32
TypeWithSize< 4 >::Int Int32
Definition: gtest-port.h:2241
google_protobuf_DescriptorProto_resize_reserved_name
UPB_INLINE upb_strview * google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1363
upb_enumdef_file
const upb_filedef * upb_enumdef_file(const upb_enumdef *e)
Definition: php/ext/google/protobuf/upb.c:1453
upb_msg_has
bool upb_msg_has(const upb_msg *msg, int field_index, const upb_msglayout *l)
Definition: php/ext/google/protobuf/upb.c:4059
google_protobuf_FileOptions_java_generate_equals_and_hash
UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1895
upb_arena_addcleanup
bool upb_arena_addcleanup(upb_arena *a, void *ud, upb_cleanup_func *func)
Definition: php/ext/google/protobuf/upb.c:5785
google::protobuf.internal::Func
static int Func(int i, int j)
Definition: src/google/protobuf/map_test.cc:981
google_protobuf_EnumValueDescriptorProto_options
const UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1725
upb_textprinter_newcache
upb_handlercache * upb_textprinter_newcache()
Definition: php/ext/google/protobuf/upb.c:8696
upb_msglayout::extendable
bool extendable
Definition: php/ext/google/protobuf/upb.h:530
upb_msgdef_selectorcount
size_t upb_msgdef_selectorcount(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1749
google_protobuf_SourceCodeInfo_Location
struct google_protobuf_SourceCodeInfo_Location google_protobuf_SourceCodeInfo_Location
Definition: php/ext/google/protobuf/upb.h:955
google_protobuf_UninterpretedOption_string_value
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2340
OP_ENDMSG
@ OP_ENDMSG
Definition: php/ext/google/protobuf/upb.h:6462
google_protobuf_EnumDescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_EnumOptions * google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1643
google_protobuf_DescriptorProto_msginit
const upb_msglayout google_protobuf_DescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:103
google_protobuf_FileDescriptorProto_add_extension
UPB_INLINE struct google_protobuf_FieldDescriptorProto * google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1166
UPB_WIRE_TYPE_VARINT
@ UPB_WIRE_TYPE_VARINT
Definition: php/ext/google/protobuf/upb.h:399
upb_arena_malloc
UPB_INLINE void * upb_arena_malloc(upb_arena *a, size_t size)
Definition: php/ext/google/protobuf/upb.h:321
byteswap64
UPB_INLINE uint64_t byteswap64(uint64_t val)
Definition: php/ext/google/protobuf/upb.h:6761
google_protobuf_SourceCodeInfo_Location_has_trailing_comments
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg)
Definition: php/ext/google/protobuf/upb.h:2461
google_protobuf_EnumValueDescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_EnumValueOptions * google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1739
upb_sink::handlers
const upb_handlers * handlers
Definition: php/ext/google/protobuf/upb.h:5674
upb_filedef_msgcount
int upb_filedef_msgcount(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2716
google_protobuf_GeneratedCodeInfo_msginit
const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit
Definition: php/ext/google/protobuf/upb.c:484
mgroup::bytecode_end
uint32_t * bytecode_end
Definition: php/ext/google/protobuf/upb.h:6525
_upb_value_val
UPB_INLINE upb_value _upb_value_val(uint64_t val, upb_ctype_t ctype)
Definition: php/ext/google/protobuf/upb.h:2687
google_protobuf_FileDescriptorProto_has_package
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1087
google_protobuf_EnumValueOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2227
OP_SETBIGGROUPNUM
@ OP_SETBIGGROUPNUM
Definition: php/ext/google/protobuf/upb.h:6475
bytes
uint8 bytes[10]
Definition: coded_stream_unittest.cc:153
upb_oneofdef_numfields
int upb_oneofdef_numfields(const upb_oneofdef *o)
Definition: php/ext/google/protobuf/upb.c:1890
google_protobuf_MessageOptions_message_set_wire_format
UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2018
google_protobuf_EnumValueDescriptorProto_has_options
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1724
upb_varint_size
UPB_INLINE size_t upb_varint_size(uint64_t val)
Definition: php/ext/google/protobuf/upb.h:6867
upb_pbdecoder_resume
int32_t upb_pbdecoder_resume(upb_pbdecoder *d, void *p, const char *buf, size_t size, const upb_bufhandle *handle)
Definition: php/ext/google/protobuf/upb.c:6939
UPB_CTYPE_FPTR
@ UPB_CTYPE_FPTR
Definition: php/ext/google/protobuf/upb.h:2651
google_protobuf_UninterpretedOption_name
const UPB_INLINE google_protobuf_UninterpretedOption_NamePart *const * google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2330
google_protobuf_GeneratedCodeInfo_Annotation
struct google_protobuf_GeneratedCodeInfo_Annotation google_protobuf_GeneratedCodeInfo_Annotation
Definition: php/ext/google/protobuf/upb.h:957
upb_oneofdef_ntof
const upb_fielddef * upb_oneofdef_ntof(const upb_oneofdef *o, const char *name, size_t length)
Definition: php/ext/google/protobuf/upb.c:1898
upb_bool_handlerfunc
bool upb_bool_handlerfunc(void *c, const void *hd, bool val)
Definition: php/ext/google/protobuf/upb.h:4140
upb_fielddef_isprimitive
bool upb_fielddef_isprimitive(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1700
upb_fielddef_issubmsg
bool upb_fielddef_issubmsg(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1687
upb_filedef_phpnamespace
const char * upb_filedef_phpnamespace(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2708
google_protobuf_FieldOptions_JSType
google_protobuf_FieldOptions_JSType
Definition: php/ext/google/protobuf/upb.h:1021
upb_strtable_init2
bool upb_strtable_init2(upb_strtable *table, upb_ctype_t ctype, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4928
google_protobuf_GeneratedCodeInfo_Annotation_msginit
const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit
Definition: php/ext/google/protobuf/upb.c:497
idx
static uint32_t idx(tarjan *t, const upb_refcounted *r)
Definition: ruby/ext/google/protobuf_c/upb.c:5925
OP_CALL
@ OP_CALL
Definition: php/ext/google/protobuf/upb.h:6479
google_protobuf_OneofDescriptorProto_parse
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1567
upb_pbdecoder::checkpoint
const char * checkpoint
Definition: php/ext/google/protobuf/upb.h:6613
google_protobuf_SourceCodeInfo_msginit
const upb_msglayout google_protobuf_SourceCodeInfo_msginit
Definition: php/ext/google/protobuf/upb.c:456
upb_byteshandler_setstartstr
bool upb_byteshandler_setstartstr(upb_byteshandler *h, upb_startstr_handlerfunc *func, void *d)
Definition: php/ext/google/protobuf/upb.c:3727
endseq
static bool endseq(void *closure, const void *handler_data)
Definition: php/ext/google/protobuf/upb.c:12641
google_protobuf_EnumValueOptions_deprecated
UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2214
google_protobuf_FieldDescriptorProto_TYPE_GROUP
@ google_protobuf_FieldDescriptorProto_TYPE_GROUP
Definition: php/ext/google/protobuf/upb.h:1004
_upb_symtab_loaddefinit
bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init)
Definition: php/ext/google/protobuf/upb.c:2819
google_protobuf_ServiceDescriptorProto
struct google_protobuf_ServiceDescriptorProto google_protobuf_ServiceDescriptorProto
Definition: php/ext/google/protobuf/upb.h:942
upb_inttable_pack
upb_inttable * upb_inttable_pack(const upb_inttable *t, void *p, size_t *ofs, size_t size)
upb_msg_oneof_next
void upb_msg_oneof_next(upb_msg_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1855
upb_alloc_func
void * upb_alloc_func(upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
Definition: php/ext/google/protobuf/upb.h:242
google_protobuf_FileOptions_set_go_package
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1932
upb_mapiter_isequal
bool upb_mapiter_isequal(const upb_mapiter *i1, const upb_mapiter *i2)
Definition: php/ext/google/protobuf/upb.c:4346
upb_fielddef_defaultfloat
float upb_fielddef_defaultfloat(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1653
_upb_noclosure
char _upb_noclosure
Definition: php/ext/google/protobuf/upb.c:3287
google_protobuf_DescriptorProto_resize_extension_range
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange ** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1298
upb_pbdecoder::arena
upb_arena * arena
Definition: php/ext/google/protobuf/upb.h:6601
upb_handlers_getprimitivehandlertype
upb_handlertype_t upb_handlers_getprimitivehandlertype(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:3549
_upb_has_field
UPB_INLINE bool _upb_has_field(const void *msg, size_t idx)
Definition: php/ext/google/protobuf/upb.h:839
google_protobuf_FileDescriptorSet_parse
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1045
google_protobuf_FieldDescriptorProto_set_type_name
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1531
upb_json_printer_newhandlers
const upb_handlers * upb_json_printer_newhandlers(const upb_msgdef *md, bool preserve_fieldnames, const void *owner)
Definition: ruby/ext/google/protobuf_c/upb.c:17487
upb_value_double
UPB_INLINE upb_value upb_value_double(double cval)
Definition: php/ext/google/protobuf/upb.h:2744
upb_msgdef_ntofz
const UPB_INLINE upb_fielddef * upb_msgdef_ntofz(const upb_msgdef *m, const char *name)
Definition: php/ext/google/protobuf/upb.h:3518
upb_handlers_getsubhandlers_sel
const upb_handlers * upb_handlers_getsubhandlers_sel(const upb_handlers *h, upb_selector_t sel)
Definition: php/ext/google/protobuf/upb.c:3537
google_protobuf_FileDescriptorProto_message_type
const UPB_INLINE google_protobuf_DescriptorProto *const * google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1090
upb_alloc_global
upb_alloc upb_alloc_global
Definition: php/ext/google/protobuf/upb.c:5612
google_protobuf_GeneratedCodeInfo_Annotation_serialize
UPB_INLINE char * google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2546
UPB_WELLKNOWN_ANY
@ UPB_WELLKNOWN_ANY
Definition: php/ext/google/protobuf/upb.h:3150
upb_msg_getunknown
const char * upb_msg_getunknown(const upb_msg *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.c:3999
testing::internal::Double
FloatingPoint< double > Double
Definition: gtest-internal.h:429
google_protobuf_FieldDescriptorProto_set_number
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1519
upb_handlers_setendsubmsg
bool upb_handlers_setendsubmsg(upb_handlers *h, const upb_fielddef *f, upb_endfield_handlerfunc *func, const upb_handlerattr *attr)
b
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:3228
ok
ROSCPP_DECL bool ok()
UPB_ENDSTR_SELECTOR
#define UPB_ENDSTR_SELECTOR
Definition: php/ext/google/protobuf/upb.h:4073
upb_msgdef_fullname
const char * upb_msgdef_fullname(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1733
google_protobuf_MethodDescriptorProto_has_input_type
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1818
upb_table::count
size_t count
Definition: php/ext/google/protobuf/upb.h:2794
upb_msg_arena
upb_arena * upb_msg_arena(const upb_msg *msg)
Definition: php/ext/google/protobuf/upb.c:4055
upb_handlers_setstartstr
bool upb_handlers_setstartstr(upb_handlers *h, const upb_fielddef *f, upb_startstr_handlerfunc *func, const upb_handlerattr *attr)
google_protobuf_FileDescriptorProto_mutable_source_code_info
UPB_INLINE struct google_protobuf_SourceCodeInfo * google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1190
upb_msg_field_iter
upb_inttable_iter upb_msg_field_iter
Definition: php/ext/google/protobuf/upb.h:3473
upb_sink_startstr
UPB_INLINE bool upb_sink_startstr(upb_sink s, upb_selector_t sel, size_t size_hint, upb_sink *sub)
Definition: php/ext/google/protobuf/upb.h:5779
testing::internal::UInt32
TypeWithSize< 4 >::UInt UInt32
Definition: gtest-port.h:2242
upb_pbcodecache
Definition: php/ext/google/protobuf/upb.h:6504
google_protobuf_ServiceDescriptorProto_mutable_method
UPB_INLINE google_protobuf_MethodDescriptorProto ** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1774
upb_oneofdef
Definition: php/ext/google/protobuf/upb.c:1176
upb_msg_field_done
bool upb_msg_field_done(const upb_msg_field_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1829
google_protobuf_MethodDescriptorProto
struct google_protobuf_MethodDescriptorProto google_protobuf_MethodDescriptorProto
Definition: php/ext/google/protobuf/upb.h:943
upb_array::type
upb_fieldtype_t type
Definition: php/ext/google/protobuf/upb.h:469
google_protobuf_GeneratedCodeInfo_Annotation_set_end
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:2576
UPB_WELLKNOWN_BYTESVALUE
@ UPB_WELLKNOWN_BYTESVALUE
Definition: php/ext/google/protobuf/upb.h:3163
google_protobuf_ServiceDescriptorProto_has_name
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1764
google_protobuf_ServiceOptions_deprecated
UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2251
upb_map_set
bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val, upb_msgval *valremoved)
Definition: php/ext/google/protobuf/upb.c:4265
upb_enumdef_fullname
const char * upb_enumdef_fullname(const upb_enumdef *e)
Definition: php/ext/google/protobuf/upb.c:1445
upb_tabkey
uintptr_t upb_tabkey
Definition: php/ext/google/protobuf/upb.h:2762
UPB_DECODER_MAX_RESIDUAL_BYTES
#define UPB_DECODER_MAX_RESIDUAL_BYTES
Definition: php/ext/google/protobuf/upb.h:6237
upb_pbdecoder::delim_end
const char * delim_end
Definition: php/ext/google/protobuf/upb.h:6616
symtab
upb_symtab * symtab
Definition: php/ext/google/protobuf/protobuf.h:765
upb_mapiter
Definition: php/ext/google/protobuf/upb.c:4296
UPB_TYPE_UINT32
@ UPB_TYPE_UINT32
Definition: php/ext/google/protobuf/upb.h:416
upb_handlers_gethandler
upb_func * upb_handlers_gethandler(const upb_handlers *h, upb_selector_t s, const void **handler_data)
Definition: php/ext/google/protobuf/upb.c:3520
upb_mapiter_value
upb_msgval upb_mapiter_value(const upb_mapiter *i)
Definition: php/ext/google/protobuf/upb.c:4338
upb_bufhandle::buf
const char * buf
Definition: php/ext/google/protobuf/upb.h:4099
upb_bytessink::handler
const upb_byteshandler * handler
Definition: php/ext/google/protobuf/upb.h:6032
google_protobuf_EnumDescriptorProto_add_value
UPB_INLINE struct google_protobuf_EnumValueDescriptorProto * google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1632
google_protobuf_FileDescriptorProto_mutable_weak_dependency
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1209
upb_strtable_insert
UPB_INLINE bool upb_strtable_insert(upb_strtable *t, const char *key, upb_value val)
Definition: php/ext/google/protobuf/upb.h:2928
upb_arrhas
UPB_INLINE bool upb_arrhas(upb_tabval key)
Definition: php/ext/google/protobuf/upb.h:2865
upb_vencode32
UPB_INLINE uint64_t upb_vencode32(uint32_t val)
Definition: php/ext/google/protobuf/upb.h:6873
begin
static size_t begin(const upb_table *t)
Definition: php/ext/google/protobuf/upb.c:4898
google_protobuf_DescriptorProto_add_extension_range
UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1301
google_protobuf_FileDescriptorProto
struct google_protobuf_FileDescriptorProto google_protobuf_FileDescriptorProto
Definition: php/ext/google/protobuf/upb.h:932
google_protobuf_SourceCodeInfo_add_location
UPB_INLINE struct google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2434
upb_handlers_setendmsg
bool upb_handlers_setendmsg(upb_handlers *h, upb_endmsg_handlerfunc *func, const upb_handlerattr *attr)
Definition: php/ext/google/protobuf/upb.c:3496
google_protobuf_MethodDescriptorProto_msginit
const upb_msglayout google_protobuf_MethodDescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:265
upb_fielddef_defaultdouble
double upb_fielddef_defaultdouble(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1658
upb_textprinter_setsingleline
void upb_textprinter_setsingleline(upb_textprinter *p, bool single_line)
Definition: php/ext/google/protobuf/upb.c:8702
google_protobuf_EnumOptions_has_allow_alias
UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2170
google_protobuf_FieldDescriptorProto_TYPE_FLOAT
@ google_protobuf_FieldDescriptorProto_TYPE_FLOAT
Definition: php/ext/google/protobuf/upb.h:996
upb_pbdecoder_unpackdispatch
UPB_INLINE void upb_pbdecoder_unpackdispatch(uint64_t dispatch, uint64_t *ofs, uint8_t *wt1, uint8_t *wt2)
Definition: php/ext/google/protobuf/upb.h:6715
google::protobuf::int32
int32_t int32
Definition: protobuf/src/google/protobuf/stubs/port.h:150
i32
UNITY_INT32 i32
Definition: unity.c:1225
upb_pbdecoder_reset
void upb_pbdecoder_reset(upb_pbdecoder *d)
Definition: php/ext/google/protobuf/upb.c:7708
google_protobuf_OneofDescriptorProto_set_options
UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions *value)
Definition: php/ext/google/protobuf/upb.h:1585
google_protobuf_MessageOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2043
OP_STARTSTR
@ OP_STARTSTR
Definition: php/ext/google/protobuf/upb.h:6467
UPB_SYNTAX_PROTO3
@ UPB_SYNTAX_PROTO3
Definition: php/ext/google/protobuf/upb.h:3141
upb_msg_oneof_iter
upb_strtable_iter upb_msg_oneof_iter
Definition: php/ext/google/protobuf/upb.h:3474
upb_msgval::str
upb_strview str
Definition: php/ext/google/protobuf/upb.h:577
UPB_ENDMSG_SELECTOR
#define UPB_ENDMSG_SELECTOR
Definition: php/ext/google/protobuf/upb.h:4066
UPB_WIRE_TYPE_START_GROUP
@ UPB_WIRE_TYPE_START_GROUP
Definition: php/ext/google/protobuf/upb.h:402
upb_pb_encoder_newcache
upb_handlercache * upb_pb_encoder_newcache()
Definition: php/ext/google/protobuf/upb.c:8325
upb_inttable_uninit2
void upb_inttable_uninit2(upb_inttable *table, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:5128
ImGui::End
IMGUI_API void End()
Definition: imgui.cpp:6007
google_protobuf_MessageOptions_parse
UPB_INLINE google_protobuf_MessageOptions * google_protobuf_MessageOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2008
google_protobuf_MessageOptions_has_deprecated
UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2021
upb_mapiter_key
upb_msgval upb_mapiter_key(const upb_mapiter *i)
Definition: php/ext/google/protobuf/upb.c:4333
upb_pbdecoder_getopname
const char * upb_pbdecoder_getopname(unsigned int op)
google_protobuf_EnumOptions_parse
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2161
obj
GLsizei GLsizei GLuint * obj
Definition: glcorearb.h:3066
google_protobuf_FileDescriptorProto_has_name
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1085
UPB_WELLKNOWN_BOOLVALUE
@ UPB_WELLKNOWN_BOOLVALUE
Definition: php/ext/google/protobuf/upb.h:3164
package
string package
google_protobuf_DescriptorProto_ExtensionRange_has_end
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg)
Definition: php/ext/google/protobuf/upb.h:1388
google_protobuf_FileOptions_php_class_prefix
UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1909
google_protobuf_GeneratedCodeInfo_Annotation_mutable_path
UPB_INLINE int32_t * google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2558
mox.Reset
def Reset(*args)
Definition: mox.py:257
google_protobuf_DescriptorProto_reserved_range
const UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *const * google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1249
google_protobuf_FileDescriptorProto_mutable_dependency
UPB_INLINE upb_strview * google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1111
upb_bufhandle::obj
const void * obj
Definition: php/ext/google/protobuf/upb.h:4106
upb_pbcodecache_setlazy
void upb_pbcodecache_setlazy(upb_pbcodecache *c, bool lazy)
upb_uint64_handlerfunc
bool upb_uint64_handlerfunc(void *c, const void *hd, uint64_t val)
Definition: php/ext/google/protobuf/upb.h:4137
upb_inttable_pop
upb_value upb_inttable_pop(upb_inttable *t)
Definition: php/ext/google/protobuf/upb.c:5216
google_protobuf_FieldDescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_FieldOptions * google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1543
upb_bufhandle
Definition: php/ext/google/protobuf/upb.h:4095
upb_sink_putunknown
UPB_INLINE bool upb_sink_putunknown(upb_sink s, const char *buf, size_t n)
Definition: php/ext/google/protobuf/upb.h:5717
google_protobuf_ExtensionRangeOptions
struct google_protobuf_ExtensionRangeOptions google_protobuf_ExtensionRangeOptions
Definition: php/ext/google/protobuf/upb.h:936
upb_fielddef_defaultstr
const char * upb_fielddef_defaultstr(const upb_fielddef *f, size_t *len)
Definition: php/ext/google/protobuf/upb.c:1663
google_protobuf_ServiceDescriptorProto_parse
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1755
google_protobuf_FileDescriptorProto_has_syntax
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1100
upb_pbdecoder_maxnesting
size_t upb_pbdecoder_maxnesting(const upb_pbdecoder *d)
Definition: php/ext/google/protobuf/upb.c:7766
upb_sink_endseq
UPB_INLINE bool upb_sink_endseq(upb_sink s, upb_selector_t sel)
Definition: php/ext/google/protobuf/upb.h:5768
upb_msgval::ptr
const void * ptr
Definition: php/ext/google/protobuf/upb.h:576
upb_free
UPB_INLINE void upb_free(upb_alloc *alloc, void *ptr)
Definition: php/ext/google/protobuf/upb.h:260
google_protobuf_EnumOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2184
upb_pbcodecache::dest
upb_handlercache * dest
Definition: php/ext/google/protobuf/upb.h:6506
google_protobuf_DescriptorProto_has_name
UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1239
putbuf
static void putbuf(upb_pb_encoder *e, const char *buf, size_t len)
Definition: php/ext/google/protobuf/upb.c:7928
google_protobuf_FileDescriptorProto_resize_public_dependency
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1202
google_protobuf_MethodOptions_set_idempotency_level
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:2297
OP_PUSHTAGDELIM
@ OP_PUSHTAGDELIM
Definition: php/ext/google/protobuf/upb.h:6471
google_protobuf_EnumDescriptorProto
struct google_protobuf_EnumDescriptorProto google_protobuf_EnumDescriptorProto
Definition: php/ext/google/protobuf/upb.h:939
upb_pbdecoder_end
bool upb_pbdecoder_end(void *closure, const void *handler_data)
Definition: php/ext/google/protobuf/upb.c:7638
Type
Definition: type.pb.h:182
google_protobuf_FileOptions_parse
UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1869
google_protobuf_FileDescriptorProto_source_code_info
const UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1097
upb_gfree
UPB_INLINE void upb_gfree(void *ptr)
Definition: php/ext/google/protobuf/upb.h:282
google_protobuf_FieldDescriptorProto_has_options
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1504
upb_symtab_addfile
const upb_filedef * upb_symtab_addfile(upb_symtab *s, const google_protobuf_FileDescriptorProto *file, upb_status *status)
Definition: php/ext/google/protobuf/upb.c:2790
upb_byteshandler
Definition: php/ext/google/protobuf/upb.h:4650
_upb_tabent::val
upb_tabval val
Definition: php/ext/google/protobuf/upb.h:2784
google_protobuf_FileOptions_set_java_string_check_utf8
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1956
upb_msg_iter_field
upb_fielddef * upb_msg_iter_field(const upb_msg_field_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1833
google_protobuf_UninterpretedOption_resize_name
UPB_INLINE google_protobuf_UninterpretedOption_NamePart ** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2347
google_protobuf_FieldOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2116
google_protobuf_FieldOptions_has_jstype
UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2080
google_protobuf_ExtensionRangeOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1467
google_protobuf_MessageOptions_set_message_set_wire_format
UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2027
upb_pbdecodermethod::code_base
union upb_pbdecodermethod::@89 code_base
google_protobuf_ServiceOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2252
google_protobuf_FieldDescriptorProto_set_default_value
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1535
upb_handlerattr::closure_type
const void * closure_type
Definition: php/ext/google/protobuf/upb.h:4087
UPB_DESCRIPTOR_TYPE_BOOL
@ UPB_DESCRIPTOR_TYPE_BOOL
Definition: php/ext/google/protobuf/upb.h:444
google::protobuf::python::cdescriptor_pool::FindFieldByName
PyObject * FindFieldByName(PyDescriptorPool *self, PyObject *arg)
Definition: descriptor_pool.cc:275
upb_fielddef_containingoneof
const upb_oneofdef * upb_fielddef_containingoneof(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1619
google_protobuf_FileOptions_set_java_generic_services
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1940
upb_table::size_lg2
uint8_t size_lg2
Definition: php/ext/google/protobuf/upb.h:2797
upb_pbdecoder::bufstart_ofs
uint64_t bufstart_ofs
Definition: php/ext/google/protobuf/upb.h:6622
OP_ENDSTR
@ OP_ENDSTR
Definition: php/ext/google/protobuf/upb.h:6469
google_protobuf_UninterpretedOption_set_aggregate_value
UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:2377
upb_msg_oneof_begin
void upb_msg_oneof_begin(upb_msg_oneof_iter *iter, const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1846
google_protobuf_EnumValueDescriptorProto
struct google_protobuf_EnumValueDescriptorProto google_protobuf_EnumValueDescriptorProto
Definition: php/ext/google/protobuf/upb.h:941
upb_oneof_iter_setdone
void upb_oneof_iter_setdone(upb_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1927
upb_map_keytype
upb_fieldtype_t upb_map_keytype(const upb_map *map)
Definition: php/ext/google/protobuf/upb.c:4242
mgroup
Definition: php/ext/google/protobuf/upb.h:6516
upb_handlers_setendseq
bool upb_handlers_setendseq(upb_handlers *h, const upb_fielddef *f, upb_endfield_handlerfunc *func, const upb_handlerattr *attr)
google_protobuf_SourceCodeInfo_Location_trailing_comments
UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg)
Definition: php/ext/google/protobuf/upb.h:2462
google_protobuf_FileDescriptorProto_resize_service
UPB_INLINE google_protobuf_ServiceDescriptorProto ** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1150
UPB_DESCRIPTOR_TYPE_BYTES
@ UPB_DESCRIPTOR_TYPE_BYTES
Definition: php/ext/google/protobuf/upb.h:448
google_protobuf_FieldDescriptorProto_TYPE_INT32
@ google_protobuf_FieldDescriptorProto_TYPE_INT32
Definition: php/ext/google/protobuf/upb.h:999
google_protobuf_FileOptions_py_generic_services
UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1893
upb_pbdecoder::stack_size
size_t stack_size
Definition: php/ext/google/protobuf/upb.h:6642
upb_msglayout_field::presence
int16_t presence
Definition: php/ext/google/protobuf/upb.h:517
testing::internal::Float
FloatingPoint< float > Float
Definition: gtest-internal.h:428
upb_bytessink_start
UPB_INLINE bool upb_bytessink_start(upb_bytessink s, size_t size_hint, void **subc)
Definition: php/ext/google/protobuf/upb.h:6042
google_protobuf_MethodDescriptorProto_name
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1817
upb_fielddef_lazy
bool upb_fielddef_lazy(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1560
google_protobuf_FileOptions_java_package
UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1879
upb_table_size
UPB_INLINE size_t upb_table_size(const upb_table *t)
Definition: php/ext/google/protobuf/upb.h:2838
upb_msg_oneof_iter_setdone
void upb_msg_oneof_iter_setdone(upb_msg_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1871
upb_bufhandle::objofs
size_t objofs
Definition: php/ext/google/protobuf/upb.h:4103
google_protobuf_UninterpretedOption_set_double_value
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value)
Definition: php/ext/google/protobuf/upb.h:2369
upb_array::len
size_t len
Definition: php/ext/google/protobuf/upb.h:472
google_protobuf_FileDescriptorProto_add_public_dependency
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1205
google_protobuf_MethodOptions_parse
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2278
upb_sink_startmsg
UPB_INLINE bool upb_sink_startmsg(upb_sink s)
Definition: php/ext/google/protobuf/upb.h:5729
upb_pbdecodermethod_desthandlers
const upb_handlers * upb_pbdecodermethod_desthandlers(const upb_pbdecodermethod *m)
Definition: php/ext/google/protobuf/upb.c:5839
upb_filedef_dep
const upb_filedef * upb_filedef_dep(const upb_filedef *f, int i)
Definition: php/ext/google/protobuf/upb.c:2728
upb_inttable_iter
Definition: php/ext/google/protobuf/upb.h:3088
offset
GLintptr offset
Definition: glcorearb.h:2944
upb_byteshandler_setendstr
bool upb_byteshandler_setendstr(upb_byteshandler *h, upb_endfield_handlerfunc *func, void *d)
Definition: php/ext/google/protobuf/upb.c:3741
UPB_HANDLER_ENDSTR
@ UPB_HANDLER_ENDSTR
Definition: php/ext/google/protobuf/upb.h:4045
google_protobuf_FieldOptions_has_weak
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2082
upb_pbdecoder::input_
upb_bytessink input_
Definition: php/ext/google/protobuf/upb.h:6604
google_protobuf_UninterpretedOption_parse
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2321
upb_strtable_iter_value
upb_value upb_strtable_iter_value(const upb_strtable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5036
upb_strtable_remove3
bool upb_strtable_remove3(upb_strtable *t, const char *key, size_t len, upb_value *val, upb_alloc *alloc)
Definition: php/ext/google/protobuf/upb.c:4991
google_protobuf_FieldOptions_STRING_PIECE
@ google_protobuf_FieldOptions_STRING_PIECE
Definition: php/ext/google/protobuf/upb.h:1018
upb_pbdecodermethod_inputhandler
const upb_byteshandler * upb_pbdecodermethod_inputhandler(const upb_pbdecodermethod *m)
Definition: php/ext/google/protobuf/upb.c:5844
upb_handlercache::closure
const void * closure
Definition: php/ext/google/protobuf/upb.c:3652
upb_status_seterrf
void upb_status_seterrf(upb_status *status, const char *fmt,...)
Definition: php/ext/google/protobuf/upb.c:5584
upb_pbdecoder::pc
const uint32_t * pc
Definition: php/ext/google/protobuf/upb.h:6610
google_protobuf_GeneratedCodeInfo_Annotation_parse
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2541
upb_pbdecoder::buf
const char * buf
Definition: php/ext/google/protobuf/upb.h:6613
google_protobuf_GeneratedCodeInfo_new
UPB_INLINE google_protobuf_GeneratedCodeInfo * google_protobuf_GeneratedCodeInfo_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2507
upb_status_errmsg
const char * upb_status_errmsg(const upb_status *status)
Definition: php/ext/google/protobuf/upb.c:5575
google_protobuf_OneofOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2147
google_protobuf_FieldDescriptorProto
struct google_protobuf_FieldDescriptorProto google_protobuf_FieldDescriptorProto
Definition: php/ext/google/protobuf/upb.h:937
upb_bytessink::closure
void * closure
Definition: php/ext/google/protobuf/upb.h:6033
OP_RET
@ OP_RET
Definition: php/ext/google/protobuf/upb.h:6480
google_protobuf_FileOptions_has_php_generic_services
UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1912
start
GLuint start
Definition: glcorearb.h:2858
UPB_WELLKNOWN_INT32VALUE
@ UPB_WELLKNOWN_INT32VALUE
Definition: php/ext/google/protobuf/upb.h:3159
opcode
opcode
Definition: php/ext/google/protobuf/upb.h:6454
upb_handlers_clearerr
void upb_handlers_clearerr(upb_handlers *h)
Definition: ruby/ext/google/protobuf_c/upb.c:4252
google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end
UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1700
google_protobuf_SourceCodeInfo_resize_location
UPB_INLINE google_protobuf_SourceCodeInfo_Location ** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2431
upb_oneofdef_name
const char * upb_oneofdef_name(const upb_oneofdef *o)
Definition: php/ext/google/protobuf/upb.c:1882
google_protobuf_FileDescriptorProto_service
const UPB_INLINE google_protobuf_ServiceDescriptorProto *const * google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1092
google_protobuf_FileOptions_java_generic_services
UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1891
upb_strtable_iter_isequal
bool upb_strtable_iter_isequal(const upb_strtable_iter *i1, const upb_strtable_iter *i2)
Definition: php/ext/google/protobuf/upb.c:5046
operator==
bool operator==(const in6_addr a, const in6_addr b)
google_protobuf_DescriptorProto_add_reserved_range
UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1353
google_protobuf_EnumDescriptorProto_resize_value
UPB_INLINE google_protobuf_EnumValueDescriptorProto ** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1629
upb_unknown_handlerfunc
bool upb_unknown_handlerfunc(void *c, const void *hd, const char *buf, size_t n)
Definition: php/ext/google/protobuf/upb.h:4128
google_protobuf_FileDescriptorProto_mutable_service
UPB_INLINE google_protobuf_ServiceDescriptorProto ** google_protobuf_FileDescriptorProto_mutable_service(google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1147
UPB_VARINT_DECODER_CHECK2
#define UPB_VARINT_DECODER_CHECK2(name, decode_max8_function)
Definition: php/ext/google/protobuf/upb.h:6806
google_protobuf_EnumOptions
struct google_protobuf_EnumOptions google_protobuf_EnumOptions
Definition: php/ext/google/protobuf/upb.h:948
upb_pb_native_wire_types
const uint8_t upb_pb_native_wire_types[]
Definition: php/ext/google/protobuf/upb.c:8708
google_protobuf_SourceCodeInfo_Location_leading_detached_comments
UPB_INLINE upb_strview const * google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2463
google_protobuf_EnumValueDescriptorProto_name
UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1721
update_failure_list.str
str
Definition: update_failure_list.py:41
OP_STARTMSG
@ OP_STARTMSG
Definition: php/ext/google/protobuf/upb.h:6461
upb_inttable
Definition: php/ext/google/protobuf/upb.h:2823
upb_decoderet_make
UPB_INLINE upb_decoderet upb_decoderet_make(const char *p, uint64_t val)
Definition: php/ext/google/protobuf/upb.h:6792
google_protobuf_FileOptions_java_multiple_files
UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1885
google_protobuf_FieldDescriptorProto_label
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1497
UPB_BREAK
#define UPB_BREAK
Definition: php/ext/google/protobuf/upb.h:4054
UPB_CTYPE_BOOL
@ UPB_CTYPE_BOOL
Definition: php/ext/google/protobuf/upb.h:2647
google_protobuf_ServiceOptions
struct google_protobuf_ServiceOptions google_protobuf_ServiceOptions
Definition: php/ext/google/protobuf/upb.h:950
google_protobuf_FileOptions_has_objc_class_prefix
UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1902
google_protobuf_DescriptorProto_ExtensionRange_parse
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1377
google_protobuf_UninterpretedOption_new
UPB_INLINE google_protobuf_UninterpretedOption * google_protobuf_UninterpretedOption_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2318
upb_pbdecoder::skip
size_t skip
Definition: php/ext/google/protobuf/upb.h:6632
google_protobuf_FileOptions_has_java_generic_services
UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1890
UPB_WIRE_TYPE_END_GROUP
@ UPB_WIRE_TYPE_END_GROUP
Definition: php/ext/google/protobuf/upb.h:403
google::protobuf::util::converter::IsMap
bool IsMap(const google::protobuf::Field &field, const google::protobuf::Type &type)
Definition: utility.cc:360
google_protobuf_SourceCodeInfo_Location_resize_path
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2468
google_protobuf_FileOptions_set_objc_class_prefix
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1964
google_protobuf_UninterpretedOption_NamePart_msginit
const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit
Definition: php/ext/google/protobuf/upb.c:442
google_protobuf_OneofDescriptorProto_has_options
UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1578
upb_handlers_getendselector
UPB_INLINE upb_selector_t upb_handlers_getendselector(upb_selector_t start)
Definition: php/ext/google/protobuf/upb.h:4221
google_protobuf_EnumValueDescriptorProto_set_options
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions *value)
Definition: php/ext/google/protobuf/upb.h:1735
testing::internal::fmt
GTEST_API_ const char * fmt
Definition: gtest.h:1835
upb_symtab
Definition: php/ext/google/protobuf/upb.c:1202
UPB_JSON_PRINTER_SIZE
#define UPB_JSON_PRINTER_SIZE
Definition: php/ext/google/protobuf/upb.h:7200
upb_enum_iter
upb_strtable_iter upb_enum_iter
Definition: php/ext/google/protobuf/upb.h:3760
google_protobuf_FileOptions_cc_generic_services
UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1889
upb_encode
char * upb_encode(const void *msg, const upb_msglayout *l, upb_arena *arena, size_t *size)
Definition: php/ext/google/protobuf/upb.c:3234
upb_wiretype_t
upb_wiretype_t
Definition: php/ext/google/protobuf/upb.h:398
p
const char * p
Definition: gmock-matchers_test.cc:3863
upb_tabval
Definition: php/ext/google/protobuf/upb.h:2773
google_protobuf_OneofOptions_serialize
UPB_INLINE char * google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2135
google_protobuf_EnumDescriptorProto_msginit
const upb_msglayout google_protobuf_EnumDescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:202
UPB_WELLKNOWN_UNSPECIFIED
@ UPB_WELLKNOWN_UNSPECIFIED
Definition: php/ext/google/protobuf/upb.h:3149
google_protobuf_UninterpretedOption_set_string_value
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:2373
upb_byteshandler_init
UPB_INLINE void upb_byteshandler_init(upb_byteshandler *handler)
Definition: php/ext/google/protobuf/upb.h:4659
UPB_TYPE_DOUBLE
@ UPB_TYPE_DOUBLE
Definition: php/ext/google/protobuf/upb.h:423
UPB_TYPE_STRING
@ UPB_TYPE_STRING
Definition: php/ext/google/protobuf/upb.h:419
upb_pbdecoder::data_end
const char * data_end
Definition: php/ext/google/protobuf/upb.h:6619
upb_msglayout::submsgs
const struct upb_msglayout *const * submsgs
Definition: php/ext/google/protobuf/upb.h:524
upb_strview_makez
UPB_INLINE upb_strview upb_strview_makez(const char *data)
Definition: php/ext/google/protobuf/upb.h:547
upb_msg
void upb_msg
Definition: php/ext/google/protobuf/upb.h:497
google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1464
upb_strtable_uninit
UPB_INLINE void upb_strtable_uninit(upb_strtable *table)
Definition: php/ext/google/protobuf/upb.h:2888
google_protobuf_FileOptions_set_java_outer_classname
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1920
upb
Definition: repeated_field.h:76
google_protobuf_DescriptorProto_nested_type
const UPB_INLINE google_protobuf_DescriptorProto *const * google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1242
upb_table::ctype
upb_ctype_t ctype
Definition: php/ext/google/protobuf/upb.h:2796
google_protobuf_FileOptions_has_go_package
UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1886
upb_handlerfree
void upb_handlerfree(void *d)
Definition: php/ext/google/protobuf/upb.h:4127
UPB_WIRE_TYPE_64BIT
@ UPB_WIRE_TYPE_64BIT
Definition: php/ext/google/protobuf/upb.h:400
upb_filedef_syntax
upb_syntax_t upb_filedef_syntax(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2712
google_protobuf_DescriptorProto_add_enum_type
UPB_INLINE struct google_protobuf_EnumDescriptorProto * google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1288
UPB_WELLKNOWN_INT64VALUE
@ UPB_WELLKNOWN_INT64VALUE
Definition: php/ext/google/protobuf/upb.h:3157
google_protobuf_FieldDescriptorProto_LABEL_REPEATED
@ google_protobuf_FieldDescriptorProto_LABEL_REPEATED
Definition: php/ext/google/protobuf/upb.h:991
UPB_HANDLER_STARTSEQ
@ UPB_HANDLER_STARTSEQ
Definition: php/ext/google/protobuf/upb.h:4048
google_protobuf_FieldDescriptorProto_TYPE_ENUM
@ google_protobuf_FieldDescriptorProto_TYPE_ENUM
Definition: php/ext/google/protobuf/upb.h:1008
upb_handlercache::callback
upb_handlers_callback * callback
Definition: php/ext/google/protobuf/upb.c:3651
upb_enum_done
bool upb_enum_done(upb_enum_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1472
google_protobuf_FieldOptions_set_ctype
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:2086
upb_label_t
upb_label_t
Definition: php/ext/google/protobuf/upb.h:429
upb_sink_startseq
UPB_INLINE bool upb_sink_startseq(upb_sink s, upb_selector_t sel, upb_sink *sub)
Definition: php/ext/google/protobuf/upb.h:5753
google_protobuf_ExtensionRangeOptions_msginit
const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit
Definition: php/ext/google/protobuf/upb.c:144
upb_pbdecoder::residual
char residual[UPB_DECODER_MAX_RESIDUAL_BYTES]
Definition: php/ext/google/protobuf/upb.h:6625
google::protobuf::uint64
uint64_t uint64
Definition: protobuf/src/google/protobuf/stubs/port.h:156
google_protobuf_EnumDescriptorProto_EnumReservedRange_end
UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1694
_upb_array_mutable_accessor
UPB_INLINE void * _upb_array_mutable_accessor(void *msg, size_t ofs, size_t *size)
Definition: php/ext/google/protobuf/upb.h:782
google_protobuf_FileOptions_set_cc_generic_services
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1936
size
#define size
Definition: glcorearb.h:2944
upb_filedef_depcount
int upb_filedef_depcount(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2720
google_protobuf_FileOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1991
upb_byteshandler_setstring
bool upb_byteshandler_setstring(upb_byteshandler *h, upb_string_handlerfunc *func, void *d)
Definition: php/ext/google/protobuf/upb.c:3734
google_protobuf_MessageOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2025
google_protobuf_ServiceDescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_ServiceOptions * google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1791
upb_strtable_iter_keylength
size_t upb_strtable_iter_keylength(const upb_strtable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5029
google_protobuf_FileDescriptorProto_syntax
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1101
google_protobuf_UninterpretedOption_has_aggregate_value
UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2341
google_protobuf_FieldDescriptorProto_TYPE_SINT32
@ google_protobuf_FieldDescriptorProto_TYPE_SINT32
Definition: php/ext/google/protobuf/upb.h:1011
google_protobuf_DescriptorProto_ExtensionRange_new
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange * google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1374
upb_oneof_iter_field
upb_fielddef * upb_oneof_iter_field(const upb_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1923
UPB_WIRE_TYPE_DELIMITED
@ UPB_WIRE_TYPE_DELIMITED
Definition: php/ext/google/protobuf/upb.h:401
google_protobuf_OneofOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2141
google_protobuf_FieldOptions_set_weak
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2106
upb_vdecode_max8_branch32
upb_decoderet upb_vdecode_max8_branch32(upb_decoderet r)
Definition: php/ext/google/protobuf/upb.c:8734
upb_json_parser_input
upb_bytessink upb_json_parser_input(upb_json_parser *p)
Definition: php/ext/google/protobuf/upb.c:12164
upb_handlers_setuint32
bool upb_handlers_setuint32(upb_handlers *h, const upb_fielddef *f, upb_uint32_handlerfunc *func, const upb_handlerattr *attr)
upb_status_vseterrf
void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args)
Definition: php/ext/google/protobuf/upb.c:5591
google_protobuf_SourceCodeInfo_location
const UPB_INLINE google_protobuf_SourceCodeInfo_Location *const * google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2426
google_protobuf_FieldDescriptorProto_has_type_name
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1500
upb_oneof_begin
void upb_oneof_begin(upb_oneof_iter *iter, const upb_oneofdef *o)
Definition: php/ext/google/protobuf/upb.c:1911
google_protobuf_EnumOptions_set_deprecated
UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2180
upb_string_handlerfunc
size_t upb_string_handlerfunc(void *c, const void *hd, const char *buf, size_t n, const upb_bufhandle *handle)
Definition: php/ext/google/protobuf/upb.h:4143
upb_array
Definition: php/ext/google/protobuf/upb.h:468
upb_pbdecoder_frame::base
const uint32_t * base
Definition: php/ext/google/protobuf/upb.h:6565
google_protobuf_MethodDescriptorProto_parse
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1807
google_protobuf_FileDescriptorProto_resize_enum_type
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1137
upb_msgval::msg
const upb_msg * msg
Definition: php/ext/google/protobuf/upb.h:574
upb_msg_new
upb_msg * upb_msg_new(const upb_msglayout *l, upb_arena *a)
Definition: php/ext/google/protobuf/upb.c:4026
upb_pbdecoder_suspend
size_t upb_pbdecoder_suspend(upb_pbdecoder *d)
Definition: php/ext/google/protobuf/upb.c:7004
google_protobuf_FileOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1914
upb_fielddef
Definition: php/ext/google/protobuf/upb.c:1118
upb_fielddef_packed
bool upb_fielddef_packed(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1564
google_protobuf_UninterpretedOption_NamePart_set_is_extension
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2406
google_protobuf_ServiceDescriptorProto_set_options
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions *value)
Definition: php/ext/google/protobuf/upb.h:1787
upb_msgfactory_free
void upb_msgfactory_free(upb_msgfactory *f)
Definition: php/ext/google/protobuf/upb.c:4557
google_protobuf_FieldDescriptorProto_has_label
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1496
upb_handlers_msgdef
const upb_msgdef * upb_handlers_msgdef(const upb_handlers *h)
Definition: php/ext/google/protobuf/upb.c:3543
upb_handlers_tabent::func
upb_func * func
Definition: php/ext/google/protobuf/upb.h:4633
upb_inttable_count
size_t upb_inttable_count(const upb_inttable *t)
Definition: php/ext/google/protobuf/upb.c:5084
OP_STRING
@ OP_STRING
Definition: php/ext/google/protobuf/upb.h:6468
google_protobuf_DescriptorProto_ExtensionRange_end
UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg)
Definition: php/ext/google/protobuf/upb.h:1389
upb_filedef
Definition: php/ext/google/protobuf/upb.c:1184
google_protobuf_MessageOptions_no_standard_descriptor_accessor
UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2020
UPB_PB_DECODER_SIZE
#define UPB_PB_DECODER_SIZE
Definition: php/ext/google/protobuf/upb.h:6295
UPB_HANDLER_UINT32
@ UPB_HANDLER_UINT32
Definition: php/ext/google/protobuf/upb.h:4038
upb_status_setoom
UPB_INLINE void upb_status_setoom(upb_status *status)
Definition: php/ext/google/protobuf/upb.h:190
google_protobuf_MessageOptions_has_no_standard_descriptor_accessor
UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2019
FUNCS
#define FUNCS(name, membername, type_t, converter, proto_type)
Definition: php/ext/google/protobuf/upb.h:2701
upb_pbdecoder_decode_f32
int32_t upb_pbdecoder_decode_f32(upb_pbdecoder *d, uint32_t *u32)
Definition: php/ext/google/protobuf/upb.c:7204
google_protobuf_DescriptorProto_field
const UPB_INLINE google_protobuf_FieldDescriptorProto *const * google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1241
upb_cleanup_func
void upb_cleanup_func(void *ud)
Definition: php/ext/google/protobuf/upb.h:300
upb_zzenc_32
UPB_INLINE uint32_t upb_zzenc_32(int32_t n)
Definition: php/ext/google/protobuf/upb.h:6781
upb_mapiter_sizeof
size_t upb_mapiter_sizeof()
Definition: php/ext/google/protobuf/upb.c:4301
google_protobuf_SourceCodeInfo_Location_new
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2445
upb_map_del
bool upb_map_del(upb_map *map, upb_msgval key)
Definition: php/ext/google/protobuf/upb.c:4284
OP_HALT
@ OP_HALT
Definition: php/ext/google/protobuf/upb.h:6497
byte
SETUP_TEARDOWN_TESTCONTEXT typedef uint8_t byte
Definition: test_stream.cpp:12
upb_array::data
void * data
Definition: php/ext/google/protobuf/upb.h:471
upb_fielddef_haspresence
bool upb_fielddef_haspresence(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1713
google_protobuf_FieldOptions_set_packed
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2090
upb_pbcodecache
struct upb_pbcodecache upb_pbcodecache
Definition: php/ext/google/protobuf/upb.h:6380
upb_fielddef_isstring
bool upb_fielddef_isstring(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1691
upb_table::mask
size_t mask
Definition: php/ext/google/protobuf/upb.h:2795
_upb_has_oneof_field
UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num)
Definition: php/ext/google/protobuf/upb.h:851
upb_syntax_t
upb_syntax_t
Definition: php/ext/google/protobuf/upb.h:3139
F
#define F(msg, field)
Definition: ruby/ext/google/protobuf_c/upb.c:9347
upb_pbdecoder_frame::groupnum
int32_t groupnum
Definition: php/ext/google/protobuf/upb.h:6570
google_protobuf_FileOptions_has_cc_enable_arenas
UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1900
upb_pb_encoder
Definition: php/ext/google/protobuf/upb.c:7892
upb_enumdef_ntoi
bool upb_enumdef_ntoi(const upb_enumdef *e, const char *name, size_t len, int32_t *num)
Definition: php/ext/google/protobuf/upb.c:1474
google_protobuf_UninterpretedOption_has_double_value
UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2337
upb_filedef_name
const char * upb_filedef_name(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2696
google_protobuf_MessageOptions_has_map_entry
UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2023
google_protobuf_DescriptorProto_ReservedRange_start
UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg)
Definition: php/ext/google/protobuf/upb.h:1431
google_protobuf_FieldDescriptorProto_has_json_name
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1508
google_protobuf_FieldDescriptorProto_has_oneof_index
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1506
google_protobuf_MethodOptions_serialize
UPB_INLINE char * google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2283
google_protobuf_GeneratedCodeInfo_add_annotation
UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation * google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2527
upb_fielddef_name
const char * upb_fielddef_name(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1568
google_protobuf_EnumValueDescriptorProto_set_name
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1727
upb_fielddef_isseq
bool upb_fielddef_isseq(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1696
upb_msglayout::field_count
uint16_t field_count
Definition: php/ext/google/protobuf/upb.h:529
google_protobuf_FileDescriptorProto_package
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1088
google_protobuf_EnumValueDescriptorProto_set_number
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1731
google_protobuf_MethodOptions_NO_SIDE_EFFECTS
@ google_protobuf_MethodOptions_NO_SIDE_EFFECTS
Definition: php/ext/google/protobuf/upb.h:1035
upb_decoderet
Definition: php/ext/google/protobuf/upb.h:6787
google_protobuf_ServiceOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2261
UPB_TYPE_MESSAGE
@ UPB_TYPE_MESSAGE
Definition: php/ext/google/protobuf/upb.h:421
google_protobuf_DescriptorProto_resize_oneof_decl
UPB_INLINE google_protobuf_OneofDescriptorProto ** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1337
google_protobuf_EnumDescriptorProto_mutable_value
UPB_INLINE google_protobuf_EnumValueDescriptorProto ** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1626
google_protobuf_FieldOptions
struct google_protobuf_FieldOptions google_protobuf_FieldOptions
Definition: php/ext/google/protobuf/upb.h:946
upb_strview_make
UPB_INLINE upb_strview upb_strview_make(const char *data, size_t size)
Definition: php/ext/google/protobuf/upb.h:540
UPB_STATUS_MAX_MESSAGE
#define UPB_STATUS_MAX_MESSAGE
Definition: php/ext/google/protobuf/upb.h:168
kPbDecoderSubmessageTooLong
const char * kPbDecoderSubmessageTooLong
Definition: php/ext/google/protobuf/upb.c:6753
upb_msgdef_ntof
const upb_fielddef * upb_msgdef_ntof(const upb_msgdef *m, const char *name, size_t len)
Definition: php/ext/google/protobuf/upb.c:1763
buf
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glcorearb.h:4175
google_protobuf_SourceCodeInfo_Location_span
UPB_INLINE int32_t const * google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2458
upb_inttable_iter_setdone
void upb_inttable_iter_setdone(upb_inttable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5354
upb_array::element_size
uint8_t element_size
Definition: php/ext/google/protobuf/upb.h:470
google_protobuf_DescriptorProto_ExtensionRange_msginit
const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit
Definition: php/ext/google/protobuf/upb.c:119
upb_tabent_isempty
UPB_INLINE bool upb_tabent_isempty(const upb_tabent *e)
Definition: php/ext/google/protobuf/upb.h:2846
UPB_TYPE_ENUM
@ UPB_TYPE_ENUM
Definition: php/ext/google/protobuf/upb.h:417
key
const SETUP_TEARDOWN_TESTCONTEXT char * key
Definition: test_wss_transport.cpp:10
google_protobuf_FileDescriptorProto_options
const UPB_INLINE google_protobuf_FileOptions * google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1095
OP_ENDSUBMSG
@ OP_ENDSUBMSG
Definition: php/ext/google/protobuf/upb.h:6466
google_protobuf_FileDescriptorProto_has_source_code_info
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1096
google_protobuf_UninterpretedOption
struct google_protobuf_UninterpretedOption google_protobuf_UninterpretedOption
Definition: php/ext/google/protobuf/upb.h:952
upb_inttable_iter::array_part
bool array_part
Definition: php/ext/google/protobuf/upb.h:3091
google_protobuf_FileDescriptorSet_new
UPB_INLINE google_protobuf_FileDescriptorSet * google_protobuf_FileDescriptorSet_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1042
UPB_CTYPE_INT64
@ UPB_CTYPE_INT64
Definition: php/ext/google/protobuf/upb.h:2644
upb_handlers_setfloat
bool upb_handlers_setfloat(upb_handlers *h, const upb_fielddef *f, upb_float_handlerfunc *func, const upb_handlerattr *attr)
UPB_HANDLER_FLOAT
@ UPB_HANDLER_FLOAT
Definition: php/ext/google/protobuf/upb.h:4040
upb_msgdef_wellknowntype
upb_wellknowntype_t upb_msgdef_wellknowntype(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1813
google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN
@ google_protobuf_MethodOptions_IDEMPOTENCY_UNKNOWN
Definition: php/ext/google/protobuf/upb.h:1034
google_protobuf_DescriptorProto_add_extension
UPB_INLINE struct google_protobuf_FieldDescriptorProto * google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1314
google_protobuf_DescriptorProto_new
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1227
MurmurHash2
uint32_t MurmurHash2(const void *key, size_t len, uint32_t seed)
Definition: php/ext/google/protobuf/upb.c:5430
google_protobuf_FileDescriptorProto_parse
UPB_INLINE google_protobuf_FileDescriptorProto * google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1076
google_protobuf_OneofDescriptorProto_options
const UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1579
google_protobuf_FieldDescriptorProto_TYPE_DOUBLE
@ google_protobuf_FieldDescriptorProto_TYPE_DOUBLE
Definition: php/ext/google/protobuf/upb.h:995
google_protobuf_EnumValueOptions_new
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2201
upb_pbdecoder_decode
size_t upb_pbdecoder_decode(void *closure, const void *hd, const char *buf, size_t size, const upb_bufhandle *handle)
Definition: php/ext/google/protobuf/upb.c:7695
google_protobuf_FileOptions_deprecated
UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1897
google_protobuf_OneofOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2139
google_protobuf_MethodDescriptorProto_has_server_streaming
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1826
google_protobuf_FileOptions_has_java_multiple_files
UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1884
google_protobuf_SourceCodeInfo_parse
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2417
google_protobuf_ServiceOptions_serialize
UPB_INLINE char * google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2246
google_protobuf_ExtensionRangeOptions_new
UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_ExtensionRangeOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1447
google::protobuf::python::unknown_field::GetData
static PyObject * GetData(PyUnknownFieldRef *self, void *closure)
Definition: unknown_fields.cc:272
UPB_LABEL_REQUIRED
@ UPB_LABEL_REQUIRED
Definition: php/ext/google/protobuf/upb.h:431
google_protobuf_ExtensionRangeOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1459
upb_msgfactory_symtab
const upb_symtab * upb_msgfactory_symtab(const upb_msgfactory *f)
Definition: php/ext/google/protobuf/upb.c:4569
upb_sink_endstr
UPB_INLINE bool upb_sink_endstr(upb_sink s, upb_selector_t sel)
Definition: php/ext/google/protobuf/upb.h:5794
UPB_DESCRIPTOR_TYPE_UINT32
@ UPB_DESCRIPTOR_TYPE_UINT32
Definition: php/ext/google/protobuf/upb.h:449
google_protobuf_FieldDescriptorProto_has_type
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1498
google_protobuf_DescriptorProto_resize_enum_type
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1285
google_protobuf_DescriptorProto_add_nested_type
UPB_INLINE struct google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1275
google_protobuf_FieldDescriptorProto_TYPE_BOOL
@ google_protobuf_FieldDescriptorProto_TYPE_BOOL
Definition: php/ext/google/protobuf/upb.h:1002
google_protobuf_FileOptions_has_csharp_namespace
UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1904
upb_enumdef_ntoiz
UPB_INLINE bool upb_enumdef_ntoiz(const upb_enumdef *e, const char *name, int32_t *num)
Definition: php/ext/google/protobuf/upb.h:3775
void
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
n
GLdouble n
Definition: glcorearb.h:4153
upb_pbcodecache_setallowjit
void upb_pbcodecache_setallowjit(upb_pbcodecache *c, bool allow)
Definition: php/ext/google/protobuf/upb.c:6700
google_protobuf_EnumDescriptorProto_reserved_name
UPB_INLINE upb_strview const * google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1620
google_protobuf_FieldDescriptorProto_TYPE_FIXED32
@ google_protobuf_FieldDescriptorProto_TYPE_FIXED32
Definition: php/ext/google/protobuf/upb.h:1001
google_protobuf_DescriptorProto_extension_range
const UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *const * google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1244
ignore_json_unknown
const upb_json_parsermethod const upb_symtab upb_sink bool ignore_json_unknown
Definition: ruby/ext/google/protobuf_c/upb.h:10504
UPB_TYPE_UINT64
@ UPB_TYPE_UINT64
Definition: php/ext/google/protobuf/upb.h:425
google_protobuf_FileDescriptorProto_serialize
UPB_INLINE char * google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1081
upb_sink_endsubmsg
UPB_INLINE bool upb_sink_endsubmsg(upb_sink s, upb_selector_t sel)
Definition: php/ext/google/protobuf/upb.h:5823
aditof::Status
Status
Status of any operation that the TOF sdk performs.
Definition: status_definitions.h:48
upb_handlers_setint32
bool upb_handlers_setint32(upb_handlers *h, const upb_fielddef *f, upb_int32_handlerfunc *func, const upb_handlerattr *attr)
_upb_tabent::next
const struct _upb_tabent * next
Definition: php/ext/google/protobuf/upb.h:2790
google_protobuf_OneofOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2144
google_protobuf_DescriptorProto_resize_nested_type
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1272
UPB_WIRE_TYPE_32BIT
@ UPB_WIRE_TYPE_32BIT
Definition: php/ext/google/protobuf/upb.h:404
i
int i
Definition: gmock-matchers_test.cc:764
status_
util::Status status_
Definition: json_util.cc:161
google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL
@ google_protobuf_FieldDescriptorProto_LABEL_OPTIONAL
Definition: php/ext/google/protobuf/upb.h:989
google_protobuf_MethodOptions_msginit
const upb_msglayout google_protobuf_MethodOptions_msginit
Definition: php/ext/google/protobuf/upb.c:411
upb_handlercache_addcleanup
bool upb_handlercache_addcleanup(upb_handlercache *h, void *p, upb_handlerfree *hfree)
Definition: php/ext/google/protobuf/upb.c:3720
upb_realloc
UPB_INLINE void * upb_realloc(upb_alloc *alloc, void *ptr, size_t oldsize, size_t size)
Definition: php/ext/google/protobuf/upb.h:254
upb_sink_reset
UPB_INLINE void upb_sink_reset(upb_sink *s, const upb_handlers *h, void *c)
Definition: php/ext/google/protobuf/upb.h:5699
google_protobuf_DescriptorProto_ReservedRange_new
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange * google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1418
upb_json_parser
Definition: php/ext/google/protobuf/upb.c:9009
google_protobuf_UninterpretedOption_NamePart_set_name_part
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:2402
google_protobuf_UninterpretedOption_NamePart_name_part
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg)
Definition: php/ext/google/protobuf/upb.h:2398
UPB_INLINE
#define UPB_INLINE
Definition: php/ext/google/protobuf/upb.h:87
upb_strtable_iter::index
size_t index
Definition: php/ext/google/protobuf/upb.h:3063
upb_handlers_selectorcount
uint32_t upb_handlers_selectorcount(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:3631
google_protobuf_EnumOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2174
upb_msg_get
upb_msgval upb_msg_get(const upb_msg *msg, int field_index, const upb_msglayout *l)
Definition: php/ext/google/protobuf/upb.c:4076
upb_sink
Definition: php/ext/google/protobuf/upb.h:5673
OP_SETDISPATCH
@ OP_SETDISPATCH
Definition: php/ext/google/protobuf/upb.h:6491
google_protobuf_FileOptions_CODE_SIZE
@ google_protobuf_FileOptions_CODE_SIZE
Definition: php/ext/google/protobuf/upb.h:1029
upb_inttable::array_count
size_t array_count
Definition: php/ext/google/protobuf/upb.h:2827
UPB_DESCRIPTOR_TYPE_MESSAGE
@ UPB_DESCRIPTOR_TYPE_MESSAGE
Definition: php/ext/google/protobuf/upb.h:447
UPB_HANDLER_STRING
@ UPB_HANDLER_STRING
Definition: php/ext/google/protobuf/upb.h:4044
google_protobuf_FileDescriptorProto_set_name
UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1103
google_protobuf_ServiceDescriptorProto_options
const UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1768
upb_handlers_setstartsubmsg
bool upb_handlers_setstartsubmsg(upb_handlers *h, const upb_fielddef *f, upb_startfield_handlerfunc *func, const upb_handlerattr *attr)
google_protobuf_FieldOptions_parse
UPB_INLINE google_protobuf_FieldOptions * google_protobuf_FieldOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2063
fields
static const upb_fielddef fields[107]
Definition: ruby/ext/google/protobuf_c/upb.c:7671
startseq
static void * startseq(void *closure, const void *handler_data)
Definition: php/ext/google/protobuf/upb.c:12632
google_protobuf_UninterpretedOption_serialize
UPB_INLINE char * google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2326
google_protobuf_FileDescriptorProto_has_options
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1094
upb_handlers_getsubhandlers
const upb_handlers * upb_handlers_getsubhandlers(const upb_handlers *h, const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:3514
upb_handlercache_get
const upb_handlers * upb_handlercache_get(upb_handlercache *cache, const upb_msgdef *md)
Definition: php/ext/google/protobuf/upb.c:3655
google_protobuf_GeneratedCodeInfo
struct google_protobuf_GeneratedCodeInfo google_protobuf_GeneratedCodeInfo
Definition: php/ext/google/protobuf/upb.h:956
upb_arena::alloc
upb_alloc alloc
Definition: php/ext/google/protobuf/upb.c:5626
upb_strtable_insert2
UPB_INLINE bool upb_strtable_insert2(upb_strtable *t, const char *key, size_t len, upb_value val)
Definition: php/ext/google/protobuf/upb.h:2922
google_protobuf_GeneratedCodeInfo_Annotation_add_path
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2564
google_protobuf_FieldDescriptorProto_TYPE_UINT32
@ google_protobuf_FieldDescriptorProto_TYPE_UINT32
Definition: php/ext/google/protobuf/upb.h:1007
type
GLenum type
Definition: glcorearb.h:2695
upb_pbdecodermethod::is_native_
bool is_native_
Definition: php/ext/google/protobuf/upb.h:6586
upb_strtable_iter_setdone
void upb_strtable_iter_setdone(upb_strtable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5041
google_protobuf_MethodOptions_set_deprecated
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2293
google_protobuf_FieldDescriptorProto_name
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1491
upb_arena_realloc
UPB_INLINE void * upb_arena_realloc(upb_arena *a, void *ptr, size_t oldsize, size_t size)
Definition: php/ext/google/protobuf/upb.h:325
google_protobuf_GeneratedCodeInfo_Annotation_resize_path
UPB_INLINE int32_t * google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2561
OP_CHECKDELIM
@ OP_CHECKDELIM
Definition: php/ext/google/protobuf/upb.h:6478
upb_inttable_iter_value
upb_value upb_inttable_iter_value(const upb_inttable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5347
google_protobuf_DescriptorProto_mutable_field
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1256
upb_handlers_setdouble
bool upb_handlers_setdouble(upb_handlers *h, const upb_fielddef *f, upb_double_handlerfunc *func, const upb_handlerattr *attr)
upb_value::val
uint64_t val
Definition: php/ext/google/protobuf/upb.h:2657
google_protobuf_FieldOptions_ctype
UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2073
upb_msglayout
Definition: php/ext/google/protobuf/upb.h:523
google_protobuf_DescriptorProto_mutable_extension_range
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange ** google_protobuf_DescriptorProto_mutable_extension_range(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1295
google_protobuf_ServiceDescriptorProto_set_name
UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1770
google_protobuf_EnumOptions_new
UPB_INLINE google_protobuf_EnumOptions * google_protobuf_EnumOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2158
upb_msgval
Definition: php/ext/google/protobuf/upb.h:565
google_protobuf_UninterpretedOption_identifier_value
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2332
google_protobuf_SourceCodeInfo_Location_msginit
const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit
Definition: php/ext/google/protobuf/upb.c:470
google_protobuf_FileOptions_has_java_generate_equals_and_hash
UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1894
UPB_DESCRIPTOR_TYPE_SINT32
@ UPB_DESCRIPTOR_TYPE_SINT32
Definition: php/ext/google/protobuf/upb.h:453
google_protobuf_MethodDescriptorProto_set_options
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions *value)
Definition: php/ext/google/protobuf/upb.h:1841
google_protobuf_OneofDescriptorProto_new
UPB_INLINE google_protobuf_OneofDescriptorProto * google_protobuf_OneofDescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1564
google_protobuf_FieldDescriptorProto_set_options
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions *value)
Definition: php/ext/google/protobuf/upb.h:1539
upb_inttable::array_size
size_t array_size
Definition: php/ext/google/protobuf/upb.h:2826
upb_msgdef_syntax
upb_syntax_t upb_msgdef_syntax(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1745
UPB_WELLKNOWN_FLOATVALUE
@ UPB_WELLKNOWN_FLOATVALUE
Definition: php/ext/google/protobuf/upb.h:3156
google_protobuf_FileOptions_set_deprecated
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1952
upb_mapiter_new
upb_mapiter * upb_mapiter_new(const upb_map *t, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4310
len
int len
Definition: php/ext/google/protobuf/map.c:206
google_protobuf_EnumDescriptorProto_resize_reserved_range
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange ** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1655
upb_ctype_t
upb_ctype_t
Definition: php/ext/google/protobuf/upb.h:2642
upb_msg_clearfield
bool upb_msg_clearfield(upb_msg *msg, int field_index, const upb_msglayout *l)
google_protobuf_FileOptions_optimize_for
UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1883
upb_arena_alloc
UPB_INLINE upb_alloc * upb_arena_alloc(upb_arena *a)
Definition: php/ext/google/protobuf/upb.h:317
upb_inttable_iter_key
uintptr_t upb_inttable_iter_key(const upb_inttable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5342
google_protobuf_FieldOptions_serialize
UPB_INLINE char * google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2068
google_protobuf_EnumDescriptorProto_serialize
UPB_INLINE char * google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1610
upb_fielddef_ismap
bool upb_fielddef_ismap(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1704
v
const GLdouble * v
Definition: glcorearb.h:3106
upb_enumdef
Definition: php/ext/google/protobuf/upb.c:1168
google::protobuf.internal.python_message.Clear
Clear
Definition: python_message.py:1431
upb_handlers_tabent::attr
upb_handlerattr attr
Definition: php/ext/google/protobuf/upb.h:4645
T
#define T(type)
Definition: php/ext/google/protobuf/upb.h:6457
google_protobuf_EnumDescriptorProto_value
const UPB_INLINE google_protobuf_EnumValueDescriptorProto *const * google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1616
upb_pbdecoder::ptr
const char * ptr
Definition: php/ext/google/protobuf/upb.h:6613
upb_handlers_status
const upb_status * upb_handlers_status(upb_handlers *h)
Definition: ruby/ext/google/protobuf_c/upb.c:4247
google_protobuf_DescriptorProto_resize_field
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1259
upb_bytessink_reset
UPB_INLINE void upb_bytessink_reset(upb_bytessink *s, const upb_byteshandler *h, void *closure)
Definition: php/ext/google/protobuf/upb.h:6036
google_protobuf_FileDescriptorProto_add_message_type
UPB_INLINE struct google_protobuf_DescriptorProto * google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1127
google_protobuf_MethodDescriptorProto_serialize
UPB_INLINE char * google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1812
google_protobuf_FieldDescriptorProto_set_oneof_index
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1552
upb_sink_startsubmsg
UPB_INLINE bool upb_sink_startsubmsg(upb_sink s, upb_selector_t sel, upb_sink *sub)
Definition: php/ext/google/protobuf/upb.h:5805
upb_enum_iter_name
const char * upb_enum_iter_name(upb_enum_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1490
google_protobuf_ServiceOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2258
google_protobuf_DescriptorProto_mutable_nested_type
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_DescriptorProto_mutable_nested_type(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1269
UPB_WELLKNOWN_LISTVALUE
@ UPB_WELLKNOWN_LISTVALUE
Definition: php/ext/google/protobuf/upb.h:3166
google_protobuf_MethodOptions_new
UPB_INLINE google_protobuf_MethodOptions * google_protobuf_MethodOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2275
upb_strtable::t
upb_table t
Definition: php/ext/google/protobuf/upb.h:2820
google_protobuf_MethodOptions_IDEMPOTENT
@ google_protobuf_MethodOptions_IDEMPOTENT
Definition: php/ext/google/protobuf/upb.h:1036
upb_json_printer_input
upb_sink upb_json_printer_input(upb_json_printer *p)
Definition: php/ext/google/protobuf/upb.c:13617
UPB_DESCRIPTOR_TYPE_INT32
@ UPB_DESCRIPTOR_TYPE_INT32
Definition: php/ext/google/protobuf/upb.h:441
google_protobuf_MessageOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2049
UPB_LABEL_REPEATED
@ UPB_LABEL_REPEATED
Definition: php/ext/google/protobuf/upb.h:432
upb_msg_oneof_done
bool upb_msg_oneof_done(const upb_msg_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1863
upb_inttable_lookupptr
bool upb_inttable_lookupptr(const upb_inttable *t, const void *key, upb_value *val)
Definition: php/ext/google/protobuf/upb.c:5229
google_protobuf_EnumDescriptorProto_EnumReservedRange
struct google_protobuf_EnumDescriptorProto_EnumReservedRange google_protobuf_EnumDescriptorProto_EnumReservedRange
Definition: php/ext/google/protobuf/upb.h:940
upb_pbdecoder::call_len
size_t call_len
Definition: php/ext/google/protobuf/upb.h:6609
upb_zzenc_64
UPB_INLINE uint64_t upb_zzenc_64(int64_t n)
Definition: php/ext/google/protobuf/upb.h:6782
google_protobuf_DescriptorProto_add_reserved_name
UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_strview val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1366
endmsg
static bool endmsg(void *c, const void *hd, upb_status *status)
Definition: php/ext/google/protobuf/upb.c:8160
google_protobuf_FileDescriptorProto_add_dependency
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_strview val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1117
UPB_HANDLER_UINT64
@ UPB_HANDLER_UINT64
Definition: php/ext/google/protobuf/upb.h:4039
google_protobuf_FileDescriptorProto_set_options
UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions *value)
Definition: php/ext/google/protobuf/upb.h:1173
google_protobuf_FileOptions_set_php_class_prefix
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1976
upb_msgdef_name
const char * upb_msgdef_name(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1741
google_protobuf_DescriptorProto_ReservedRange
struct google_protobuf_DescriptorProto_ReservedRange google_protobuf_DescriptorProto_ReservedRange
Definition: php/ext/google/protobuf/upb.h:935
_upb_tabent
Definition: php/ext/google/protobuf/upb.h:2782
google_protobuf_FileOptions_has_java_string_check_utf8
UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1898
upb_table
Definition: php/ext/google/protobuf/upb.h:2793
upb_strtable_begin
void upb_strtable_begin(upb_strtable_iter *i, const upb_strtable *t)
Definition: php/ext/google/protobuf/upb.c:5009
google_protobuf_FieldDescriptorProto_has_name
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1490
upb_handlers_callback
void upb_handlers_callback(const void *closure, upb_handlers *h)
Definition: php/ext/google/protobuf/upb.h:4597
upb_inttable_removeptr
bool upb_inttable_removeptr(upb_inttable *t, const void *key, upb_value *val)
Definition: php/ext/google/protobuf/upb.c:5234
ch
char ch
Definition: gmock-matchers_test.cc:3871
google_protobuf_ServiceDescriptorProto_has_options
UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1767
google_protobuf_GeneratedCodeInfo_resize_annotation
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation ** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2524
google_protobuf_DescriptorProto_ExtensionRange_has_options
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg)
Definition: php/ext/google/protobuf/upb.h:1390
upb_fielddef_msgsubdef
const upb_msgdef * upb_fielddef_msgsubdef(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1677
upb_msgfactory_getlayout
const upb_msglayout * upb_msgfactory_getlayout(upb_msgfactory *f, const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:4573
upb_json_codecache_free
void upb_json_codecache_free(upb_json_codecache *cache)
Definition: php/ext/google/protobuf/upb.c:12187
google_protobuf_ServiceDescriptorProto_serialize
UPB_INLINE char * google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1760
benchmarks.python.py_benchmark.dest
dest
Definition: py_benchmark.py:13
UPB_HANDLER_BOOL
@ UPB_HANDLER_BOOL
Definition: php/ext/google/protobuf/upb.h:4042
kPbDecoderStackOverflow
const char * kPbDecoderStackOverflow
Definition: php/ext/google/protobuf/upb.c:6752
google_protobuf_FileDescriptorProto_resize_message_type
UPB_INLINE google_protobuf_DescriptorProto ** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1124
google_protobuf_OneofOptions_parse
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2130
UPB_CTYPE_CONSTPTR
@ UPB_CTYPE_CONSTPTR
Definition: php/ext/google/protobuf/upb.h:2650
upb_oneofdef_containingtype
const upb_msgdef * upb_oneofdef_containingtype(const upb_oneofdef *o)
Definition: php/ext/google/protobuf/upb.c:1886
google_protobuf_OneofOptions_new
UPB_INLINE google_protobuf_OneofOptions * google_protobuf_OneofOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2127
size
GLsizeiptr size
Definition: glcorearb.h:2943
UPB_STRING_SELECTOR
#define UPB_STRING_SELECTOR
Definition: php/ext/google/protobuf/upb.h:4072
upb_strview_eql
UPB_INLINE bool upb_strview_eql(upb_strview a, upb_strview b)
Definition: php/ext/google/protobuf/upb.h:551
google_protobuf_DescriptorProto_mutable_enum_type
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_DescriptorProto_mutable_enum_type(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1282
google_protobuf_DescriptorProto_mutable_oneof_decl
UPB_INLINE google_protobuf_OneofDescriptorProto ** google_protobuf_DescriptorProto_mutable_oneof_decl(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1334
upb_handlercache_new
upb_handlercache * upb_handlercache_new(upb_handlers_callback *callback, const void *closure)
Definition: php/ext/google/protobuf/upb.c:3694
upb_pbcodecache_new
upb_pbcodecache * upb_pbcodecache_new(upb_handlercache *dest)
Definition: php/ext/google/protobuf/upb.c:6666
startmsg
static bool startmsg(void *c, const void *hd)
Definition: php/ext/google/protobuf/upb.c:8151
upb_strtable_pack
upb_strtable * upb_strtable_pack(const upb_strtable *t, void *p, size_t *ofs, size_t size)
zmq::operator!=
bool operator!=(const detail::socket_base &a, const detail::socket_base &b) ZMQ_NOTHROW
Definition: zmq.hpp:2150
upb_enumdef_name
const char * upb_enumdef_name(const upb_enumdef *e)
Definition: php/ext/google/protobuf/upb.c:1449
google_protobuf_UninterpretedOption_NamePart_has_is_extension
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg)
Definition: php/ext/google/protobuf/upb.h:2399
upb_bytessink_putbuf
UPB_INLINE size_t upb_bytessink_putbuf(upb_bytessink s, void *subc, const char *buf, size_t size, const upb_bufhandle *handle)
Definition: php/ext/google/protobuf/upb.h:6057
google_protobuf_EnumDescriptorProto_name
UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1615
google_protobuf_ServiceOptions_new
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2238
google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments
UPB_INLINE upb_strview * google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2493
google_protobuf_EnumValueOptions_parse
UPB_INLINE google_protobuf_EnumValueOptions * google_protobuf_EnumValueOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2204
google_protobuf_EnumValueDescriptorProto_has_number
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1722
upb_inttable_insert2
bool upb_inttable_insert2(upb_inttable *t, uintptr_t key, upb_value val, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:5133
google_protobuf_FieldOptions_set_jstype
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:2102
upb_pbdecoder_frame::dispatch
upb_inttable * dispatch
Definition: php/ext/google/protobuf/upb.h:6571
upb_pbdecodermethod::ptr
void * ptr
Definition: php/ext/google/protobuf/upb.h:6579
google_protobuf_FileOptions_has_cc_generic_services
UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1888
google_protobuf_FileDescriptorProto_add_service
UPB_INLINE struct google_protobuf_ServiceDescriptorProto * google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1153
google_protobuf_DescriptorProto_reserved_name
UPB_INLINE upb_strview const * google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1250
func
GLenum func
Definition: glcorearb.h:3052
upb_getentry
static const upb_tabent * upb_getentry(const upb_table *t, uint32_t hash)
Definition: php/ext/google/protobuf/upb.h:2861
upb_strtable_lookup2
bool upb_strtable_lookup2(const upb_strtable *t, const char *key, size_t len, upb_value *v)
Definition: php/ext/google/protobuf/upb.c:4985
upb_handlerattr::return_closure_type
const void * return_closure_type
Definition: php/ext/google/protobuf/upb.h:4088
UPB_CTYPE_PTR
@ UPB_CTYPE_PTR
Definition: php/ext/google/protobuf/upb.h:2649
upb_handlers_selectorbaseoffset
uint32_t upb_handlers_selectorbaseoffset(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:3627
upb_array::arena
upb_arena * arena
Definition: php/ext/google/protobuf/upb.h:474
upb_inttable_replace
bool upb_inttable_replace(upb_inttable *t, uintptr_t key, upb_value val)
Definition: php/ext/google/protobuf/upb.c:5183
google_protobuf_GeneratedCodeInfo_Annotation_end
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
Definition: php/ext/google/protobuf/upb.h:2556
google_protobuf_FieldOptions_has_ctype
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2072
upb_wellknowntype_t
upb_wellknowntype_t
Definition: php/ext/google/protobuf/upb.h:3148
m
const upb_json_parsermethod * m
Definition: ruby/ext/google/protobuf_c/upb.h:10501
google_protobuf_FileOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1994
upb_strtable_resize
bool upb_strtable_resize(upb_strtable *t, size_t size_lg2, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:4939
google_protobuf_DescriptorProto_add_field
UPB_INLINE struct google_protobuf_FieldDescriptorProto * google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1262
upb_oneof_next
void upb_oneof_next(upb_oneof_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1915
google_protobuf_EnumOptions_msginit
const upb_msglayout google_protobuf_EnumOptions_msginit
Definition: php/ext/google/protobuf/upb.c:365
google_protobuf_FileDescriptorSet
struct google_protobuf_FileDescriptorSet google_protobuf_FileDescriptorSet
Definition: php/ext/google/protobuf/upb.h:931
google_protobuf_FieldDescriptorProto_TYPE_SFIXED64
@ google_protobuf_FieldDescriptorProto_TYPE_SFIXED64
Definition: php/ext/google/protobuf/upb.h:1010
google_protobuf_FieldDescriptorProto_set_json_name
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1556
upb_fielddef_type
upb_fieldtype_t upb_fielddef_type(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1505
upb_symtab_free
void upb_symtab_free(upb_symtab *s)
Definition: php/ext/google/protobuf/upb.c:2740
UPB_DESCRIPTOR_TYPE_ENUM
@ UPB_DESCRIPTOR_TYPE_ENUM
Definition: php/ext/google/protobuf/upb.h:450
google_protobuf_FieldOptions_jstype
UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2081
google_protobuf_UninterpretedOption_NamePart_new
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2385
PTR_AT
#define PTR_AT(msg, ofs, type)
Definition: php/ext/google/protobuf/upb.h:768
google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize
UPB_INLINE char * google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1687
upb_json_codecache_new
upb_json_codecache * upb_json_codecache_new()
Definition: php/ext/google/protobuf/upb.c:12173
google_protobuf_ServiceDescriptorProto_method
const UPB_INLINE google_protobuf_MethodDescriptorProto *const * google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1766
google_protobuf_UninterpretedOption_NamePart_parse
UPB_INLINE google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2388
google_protobuf_OneofOptions_msginit
const upb_msglayout google_protobuf_OneofOptions_msginit
Definition: php/ext/google/protobuf/upb.c:349
google_protobuf_FieldOptions_has_lazy
UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2078
r
GLboolean r
Definition: glcorearb.h:3228
google_protobuf_DescriptorProto_ExtensionRange_mutable_options
UPB_INLINE struct google_protobuf_ExtensionRangeOptions * google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1405
upb_symtab
struct upb_symtab upb_symtab
Definition: php/ext/google/protobuf/upb.h:3137
upb_startstr_handlerfunc
void * upb_startstr_handlerfunc(void *c, const void *hd, size_t size_hint)
Definition: php/ext/google/protobuf/upb.h:4141
google_protobuf_FieldDescriptorProto_json_name
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1509
google_protobuf_DescriptorProto_name
UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1240
UPB_TYPE_BYTES
@ UPB_TYPE_BYTES
Definition: php/ext/google/protobuf/upb.h:420
upb_fielddef_defaultbool
bool upb_fielddef_defaultbool(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1648
google_protobuf_UninterpretedOption_double_value
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2338
upb_fielddef_getjsonname
size_t upb_fielddef_getjsonname(const upb_fielddef *f, char *buf, size_t len)
Definition: php/ext/google/protobuf/upb.c:1576
upb_pbdecoder::residual_end
char * residual_end
Definition: php/ext/google/protobuf/upb.h:6626
upb_enumdef_default
int32_t upb_enumdef_default(const upb_enumdef *e)
Definition: php/ext/google/protobuf/upb.c:1457
UPB_HANDLER_ENDSUBMSG
@ UPB_HANDLER_ENDSUBMSG
Definition: php/ext/google/protobuf/upb.h:4047
default_value
def default_value(type_)
upb_inthash
UPB_INLINE uint32_t upb_inthash(uintptr_t key)
Definition: php/ext/google/protobuf/upb.h:2857
upb_msgval_makestr
UPB_INLINE upb_msgval upb_msgval_makestr(const char *data, size_t size)
Definition: php/ext/google/protobuf/upb.h:608
upb_pbdecoder_startjit
void * upb_pbdecoder_startjit(void *closure, const void *hd, size_t size_hint)
Definition: php/ext/google/protobuf/upb.c:7627
UPB_DESCRIPTOR_TYPE_SINT64
@ UPB_DESCRIPTOR_TYPE_SINT64
Definition: php/ext/google/protobuf/upb.h:454
google_protobuf_UninterpretedOption_add_name
UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart * google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2350
upb_fielddef_defaultuint64
uint64_t upb_fielddef_defaultuint64(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1638
google_protobuf_ServiceDescriptorProto_new
UPB_INLINE google_protobuf_ServiceDescriptorProto * google_protobuf_ServiceDescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1752
upb_inttable_insert
UPB_INLINE bool upb_inttable_insert(upb_inttable *t, uintptr_t key, upb_value val)
Definition: php/ext/google/protobuf/upb.h:2917
upb_ok
bool upb_ok(const upb_status *status)
Definition: php/ext/google/protobuf/upb.c:5573
google_protobuf_SourceCodeInfo_mutable_location
UPB_INLINE google_protobuf_SourceCodeInfo_Location ** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2428
upb_inttable_compact
UPB_INLINE void upb_inttable_compact(upb_inttable *t)
Definition: php/ext/google/protobuf/upb.h:2993
google_protobuf_FileDescriptorProto_resize_weak_dependency
UPB_INLINE int32_t * google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1212
upb_bytessink_end
UPB_INLINE bool upb_bytessink_end(upb_bytessink s)
Definition: php/ext/google/protobuf/upb.h:6070
upb_msg_set
void upb_msg_set(upb_msg *msg, int field_index, upb_msgval val, const upb_msglayout *l)
Definition: php/ext/google/protobuf/upb.c:4083
upb_filedef_package
const char * upb_filedef_package(const upb_filedef *f)
Definition: php/ext/google/protobuf/upb.c:2700
upb_strtable
Definition: php/ext/google/protobuf/upb.h:2819
google_protobuf_FieldOptions_set_deprecated
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2094
google_protobuf_UninterpretedOption_aggregate_value
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg)
Definition: php/ext/google/protobuf/upb.h:2342
google_protobuf_SourceCodeInfo_Location_parse
UPB_INLINE google_protobuf_SourceCodeInfo_Location * google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2448
google_protobuf_FileOptions_set_php_namespace
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1980
google_protobuf_OneofDescriptorProto_serialize
UPB_INLINE char * google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1572
upb_pbdecoder_decode_varint_slow
int32_t upb_pbdecoder_decode_varint_slow(upb_pbdecoder *d, uint64_t *u64)
Definition: php/ext/google/protobuf/upb.c:7130
upb_gmalloc
UPB_INLINE void * upb_gmalloc(size_t size)
Definition: php/ext/google/protobuf/upb.h:274
upb_tabval::val
uint64_t val
Definition: php/ext/google/protobuf/upb.h:2774
google_protobuf_SourceCodeInfo_Location_add_span
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2481
google_protobuf_UninterpretedOption_mutable_name
UPB_INLINE google_protobuf_UninterpretedOption_NamePart ** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2344
handler
void * handler
Definition: test_security_curve.cpp:27
google_protobuf_FileDescriptorSet_mutable_file
UPB_INLINE google_protobuf_FileDescriptorProto ** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1056
OP_PUSHLENDELIM
@ OP_PUSHLENDELIM
Definition: php/ext/google/protobuf/upb.h:6472
google_protobuf_FieldDescriptorProto_TYPE_SFIXED32
@ google_protobuf_FieldDescriptorProto_TYPE_SFIXED32
Definition: php/ext/google/protobuf/upb.h:1009
upb_mapiter_next
void upb_mapiter_next(upb_mapiter *i)
Definition: php/ext/google/protobuf/upb.c:4325
Type
struct Type Type
Definition: php/ext/google/protobuf/protobuf.h:664
google_protobuf_FieldOptions_uninterpreted_option
const UPB_INLINE google_protobuf_UninterpretedOption *const * google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2084
google_protobuf_MessageOptions_deprecated
UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2022
google_protobuf_DescriptorProto_parse
UPB_INLINE google_protobuf_DescriptorProto * google_protobuf_DescriptorProto_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1230
google_protobuf_SourceCodeInfo_Location_set_leading_comments
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:2485
google_protobuf_EnumDescriptorProto_reserved_range
const UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *const * google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1619
upb_filedef_msg
const upb_msgdef * upb_filedef_msg(const upb_filedef *f, int i)
Definition: php/ext/google/protobuf/upb.c:2732
UPB_TYPE_INT64
@ UPB_TYPE_INT64
Definition: php/ext/google/protobuf/upb.h:424
upb_inttable_uninit
UPB_INLINE void upb_inttable_uninit(upb_inttable *table)
Definition: php/ext/google/protobuf/upb.h:2884
OP_STARTSEQ
@ OP_STARTSEQ
Definition: php/ext/google/protobuf/upb.h:6463
google_protobuf_FileDescriptorProto_resize_dependency
UPB_INLINE upb_strview * google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1114
upb_status_clear
void upb_status_clear(upb_status *status)
Definition: php/ext/google/protobuf/upb.c:5567
upb_msgdef_setsyntax
bool upb_msgdef_setsyntax(upb_msgdef *m, upb_syntax_t syntax)
Definition: ruby/ext/google/protobuf_c/upb.c:2548
google_protobuf_MethodDescriptorProto_client_streaming
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1825
upb_msgval::b
bool b
Definition: php/ext/google/protobuf/upb.h:566
upb_alloc::func
upb_alloc_func * func
Definition: php/ext/google/protobuf/upb.h:246
upb_msg_field_iter_setdone
void upb_msg_field_iter_setdone(upb_msg_field_iter *iter)
Definition: php/ext/google/protobuf/upb.c:1837
google_protobuf_DescriptorProto_ExtensionRange_has_start
UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg)
Definition: php/ext/google/protobuf/upb.h:1386
google_protobuf_SourceCodeInfo_serialize
UPB_INLINE char * google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2422
upb_handlerattr
Definition: php/ext/google/protobuf/upb.h:4085
google_protobuf_FileOptions_swift_prefix
UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1907
google_protobuf_EnumValueDescriptorProto_msginit
const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:229
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: glcorearb.h:2879
upb_array_get
upb_msgval upb_array_get(const upb_array *arr, size_t i)
Definition: php/ext/google/protobuf/upb.c:4121
google_protobuf_FieldDescriptorProto_has_extendee
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1492
upb_pbdecoder::buf_param
const char * buf_param
Definition: php/ext/google/protobuf/upb.h:6635
google_protobuf_FileOptions_set_optimize_for
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1924
google_protobuf_SourceCodeInfo_Location_add_path
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2471
upb_grealloc
UPB_INLINE void * upb_grealloc(void *ptr, size_t oldsize, size_t size)
Definition: php/ext/google/protobuf/upb.h:278
google_protobuf_FileOptions_has_optimize_for
UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1882
google_protobuf_MethodDescriptorProto_input_type
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1819
google_protobuf_MethodDescriptorProto_set_name
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1829
google_protobuf_GeneratedCodeInfo_Annotation_has_end
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
Definition: php/ext/google/protobuf/upb.h:2555
upb_inttable_done
bool upb_inttable_done(const upb_inttable_iter *i)
Definition: php/ext/google/protobuf/upb.c:5331
google_protobuf_FileOptions
struct google_protobuf_FileOptions google_protobuf_FileOptions
Definition: php/ext/google/protobuf/upb.h:944
google_protobuf_FileOptions_set_java_generate_equals_and_hash
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1948
upb_pbdecoder::size_param
size_t size_param
Definition: php/ext/google/protobuf/upb.h:6636
upb_inttable_iter::index
size_t index
Definition: php/ext/google/protobuf/upb.h:3090
true
#define true
Definition: cJSON.c:65
upb_bytessink
Definition: php/ext/google/protobuf/upb.h:6031
google_protobuf_UninterpretedOption_NamePart_has_name_part
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg)
Definition: php/ext/google/protobuf/upb.h:2397
upb_map_valuetype
upb_fieldtype_t upb_map_valuetype(const upb_map *map)
Definition: php/ext/google/protobuf/upb.c:4246
google_protobuf_FieldOptions_msginit
const upb_msglayout google_protobuf_FieldOptions_msginit
Definition: php/ext/google/protobuf/upb.c:335
MessageLayout
Definition: php/ext/google/protobuf/protobuf.h:927
upb_mapiter_setdone
void upb_mapiter_setdone(upb_mapiter *i)
Definition: php/ext/google/protobuf/upb.c:4342
google_protobuf_EnumDescriptorProto_has_name
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1614
upb_msgdef_numfields
int upb_msgdef_numfields(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1799
google_protobuf_FileOptions_set_swift_prefix
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1972
upb_msgdef_submsgfieldcount
uint32_t upb_msgdef_submsgfieldcount(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1753
upb_symtab_lookupmsg
const upb_msgdef * upb_symtab_lookupmsg(const upb_symtab *s, const char *sym)
Definition: php/ext/google/protobuf/upb.c:2765
google_protobuf_FileOptions_has_py_generic_services
UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1892
google_protobuf_FieldDescriptorProto_set_type
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1527
testing::Return
internal::ReturnAction< R > Return(R value)
Definition: gmock-actions.h:1041
upb_map_size
size_t upb_map_size(const upb_map *map)
Definition: php/ext/google/protobuf/upb.c:4238
upb_pbdecodermethod::dest_handlers_
const upb_handlers * dest_handlers_
Definition: php/ext/google/protobuf/upb.h:6592
upb_strview
Definition: php/ext/google/protobuf/upb.h:535
val
GLuint GLfloat * val
Definition: glcorearb.h:3604
upb_msg_field_iter_isequal
bool upb_msg_field_iter_isequal(const upb_msg_field_iter *iter1, const upb_msg_field_iter *iter2)
Definition: php/ext/google/protobuf/upb.c:1841
upb_map_get
bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val)
Definition: php/ext/google/protobuf/upb.c:4250
google_protobuf_MethodDescriptorProto_set_input_type
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1833
google_protobuf_DescriptorProto_has_options
UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1246
upb_msgdef_mapentry
bool upb_msgdef_mapentry(const upb_msgdef *m)
Definition: php/ext/google/protobuf/upb.c:1809
upb_float_handlerfunc
bool upb_float_handlerfunc(void *c, const void *hd, float val)
Definition: php/ext/google/protobuf/upb.h:4138
upb_msgval::u32
uint32_t u32
Definition: php/ext/google/protobuf/upb.h:571
upb_gstrdup
UPB_INLINE char * upb_gstrdup(const char *s)
Definition: php/ext/google/protobuf/upb.h:2677
upb_tabstr
UPB_INLINE char * upb_tabstr(upb_tabkey key, uint32_t *len)
Definition: php/ext/google/protobuf/upb.h:2764
google_protobuf_MessageOptions
struct google_protobuf_MessageOptions google_protobuf_MessageOptions
Definition: php/ext/google/protobuf/upb.h:945
upb_textprinter_input
upb_sink upb_textprinter_input(upb_textprinter *p)
Definition: php/ext/google/protobuf/upb.c:8700
upb_pbdecoder_input
upb_bytessink upb_pbdecoder_input(upb_pbdecoder *d)
Definition: php/ext/google/protobuf/upb.c:7762
upb_pbcodecache::groups
upb_inttable groups
Definition: php/ext/google/protobuf/upb.h:6511
upb_msgval::i64
int64_t i64
Definition: php/ext/google/protobuf/upb.h:570
upb_array::size
size_t size
Definition: php/ext/google/protobuf/upb.h:473
SET_TYPE
#define SET_TYPE(dest, val)
Definition: php/ext/google/protobuf/upb.h:2666
google_protobuf_ServiceDescriptorProto_msginit
const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:246
upb_oneof_iter
upb_inttable_iter upb_oneof_iter
Definition: php/ext/google/protobuf/upb.h:3353
f
GLfloat f
Definition: glcorearb.h:3964
google_protobuf_GeneratedCodeInfo_Annotation_set_begin
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:2572
upb_malloc
UPB_INLINE void * upb_malloc(upb_alloc *alloc, size_t size)
Definition: php/ext/google/protobuf/upb.h:249
google_protobuf_SourceCodeInfo_Location_mutable_path
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2465
google_protobuf_DescriptorProto_set_options
UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions *value)
Definition: php/ext/google/protobuf/upb.h:1321
google_protobuf_MethodDescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_MethodOptions * google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1845
upb_def_init
struct upb_def_init upb_def_init
google_protobuf_FileDescriptorSet_msginit
const upb_msglayout google_protobuf_FileDescriptorSet_msginit
Definition: php/ext/google/protobuf/upb.c:44
upb_handlers_getattr
bool upb_handlers_getattr(const upb_handlers *h, upb_selector_t s, upb_handlerattr *attr)
Definition: php/ext/google/protobuf/upb.c:3529
google_protobuf_EnumValueOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2224
upb_pbdecoder::last
const uint32_t * last
Definition: php/ext/google/protobuf/upb.h:6610
UPB_PB_ENCODER_SIZE
#define UPB_PB_ENCODER_SIZE
Definition: php/ext/google/protobuf/upb.h:6922
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093
google_protobuf_UninterpretedOption_set_negative_int_value
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value)
Definition: php/ext/google/protobuf/upb.h:2365
google_protobuf_FileOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1988
UPB_STARTSTR_SELECTOR
#define UPB_STARTSTR_SELECTOR
Definition: php/ext/google/protobuf/upb.h:4071
google_protobuf_FileOptions_has_php_class_prefix
UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1908
upb_strtable_iter::t
const upb_strtable * t
Definition: php/ext/google/protobuf/upb.h:3062
upb_arena_bytesallocated
size_t upb_arena_bytesallocated(const upb_arena *a)
Definition: php/ext/google/protobuf/upb.c:5799
google_protobuf_FileOptions_set_php_generic_services
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1984
UPB_BYTESHANDLER_INIT
#define UPB_BYTESHANDLER_INIT
Definition: php/ext/google/protobuf/upb.h:4654
mgroup::bytecode
uint32_t * bytecode
Definition: php/ext/google/protobuf/upb.h:6524
upb_strtable_lookup
UPB_INLINE bool upb_strtable_lookup(const upb_strtable *t, const char *key, upb_value *v)
Definition: php/ext/google/protobuf/upb.h:2940
UPB_WELLKNOWN_FIELDMASK
@ UPB_WELLKNOWN_FIELDMASK
Definition: php/ext/google/protobuf/upb.h:3151
google_protobuf_EnumValueDescriptorProto_number
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1723
UPB_WELLKNOWN_STRUCT
@ UPB_WELLKNOWN_STRUCT
Definition: php/ext/google/protobuf/upb.h:3167
google_protobuf_EnumDescriptorProto_has_options
UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1617
google_protobuf_FieldDescriptorProto_type
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1499
google_protobuf_FileOptions_objc_class_prefix
UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1903
assert.h
google_protobuf_FileOptions_php_namespace
UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1911
upb_pbdecoder::status
upb_status * status
Definition: php/ext/google/protobuf/upb.h:6644
upb_sink::closure
void * closure
Definition: php/ext/google/protobuf/upb.h:5675
upb_inttable_push
UPB_INLINE bool upb_inttable_push(upb_inttable *t, upb_value val)
Definition: php/ext/google/protobuf/upb.h:2972
upb_pbdecoder::top
upb_pbdecoder_frame * top
Definition: php/ext/google/protobuf/upb.h:6640
UPB_HANDLER_STARTSTR
@ UPB_HANDLER_STARTSTR
Definition: php/ext/google/protobuf/upb.h:4043
google_protobuf_FieldOptions_lazy
UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2079
google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1461
google_protobuf_OneofDescriptorProto_msginit
const upb_msglayout google_protobuf_OneofDescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:182
google_protobuf_MethodDescriptorProto_has_options
UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1822
google_protobuf_EnumOptions_set_allow_alias
UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2176
google_protobuf_FieldOptions_set_lazy
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:2098
google_protobuf_FileOptions_set_cc_enable_arenas
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1960
upb_msgval::dbl
double dbl
Definition: php/ext/google/protobuf/upb.h:568
upb_strtable_iter
Definition: php/ext/google/protobuf/upb.h:3061
upb_pbdecodermethod::group
const mgroup * group
Definition: php/ext/google/protobuf/upb.h:6583
upb_symtab_filecount
int upb_symtab_filecount(const upb_symtab *s)
UPB_DESCRIPTOR_TYPE_GROUP
@ UPB_DESCRIPTOR_TYPE_GROUP
Definition: php/ext/google/protobuf/upb.h:446
google_protobuf_FieldDescriptorProto_number
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1495
google_protobuf_EnumDescriptorProto_set_options
UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions *value)
Definition: php/ext/google/protobuf/upb.h:1639
google_protobuf_FileOptions_SPEED
@ google_protobuf_FileOptions_SPEED
Definition: php/ext/google/protobuf/upb.h:1028
_upb_tabent::key
upb_tabkey key
Definition: php/ext/google/protobuf/upb.h:2783
output
const upb_json_parsermethod const upb_symtab upb_sink * output
Definition: ruby/ext/google/protobuf_c/upb.h:10503
UPB_WELLKNOWN_UINT32VALUE
@ UPB_WELLKNOWN_UINT32VALUE
Definition: php/ext/google/protobuf/upb.h:3160
upb_mapiter_done
bool upb_mapiter_done(const upb_mapiter *i)
Definition: php/ext/google/protobuf/upb.c:4329
upb_map_new
upb_map * upb_map_new(upb_fieldtype_t ktype, upb_fieldtype_t vtype, upb_arena *a)
Definition: php/ext/google/protobuf/upb.c:4216
UPB_WELLKNOWN_DURATION
@ UPB_WELLKNOWN_DURATION
Definition: php/ext/google/protobuf/upb.h:3152
google_protobuf_DescriptorProto_enum_type
const UPB_INLINE google_protobuf_EnumDescriptorProto *const * google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1243
UPB_WELLKNOWN_VALUE
@ UPB_WELLKNOWN_VALUE
Definition: php/ext/google/protobuf/upb.h:3165
upb_textprinter
Definition: php/ext/google/protobuf/upb.c:8385
upb_msgdef_lookupnamez
UPB_INLINE bool upb_msgdef_lookupnamez(const upb_msgdef *m, const char *name, const upb_fielddef **f, const upb_oneofdef **o)
Definition: php/ext/google/protobuf/upb.h:3533
_upb_array_accessor
const UPB_INLINE void * _upb_array_accessor(const void *msg, size_t ofs, size_t *size)
Definition: php/ext/google/protobuf/upb.h:770
google_protobuf_FieldOptions_weak
UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2083
google_protobuf_OneofDescriptorProto_mutable_options
UPB_INLINE struct google_protobuf_OneofOptions * google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1589
upb_alloc
Definition: php/ext/google/protobuf/upb.h:245
upb_uint32_handlerfunc
bool upb_uint32_handlerfunc(void *c, const void *hd, uint32_t val)
Definition: php/ext/google/protobuf/upb.h:4136
UPB_TYPE_BOOL
@ UPB_TYPE_BOOL
Definition: php/ext/google/protobuf/upb.h:412
google_protobuf_SourceCodeInfo_Location_serialize
UPB_INLINE char * google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2453
upb_array_new
upb_array * upb_array_new(upb_fieldtype_t type, upb_arena *a)
Definition: php/ext/google/protobuf/upb.c:4095
google_protobuf_UninterpretedOption_set_positive_int_value
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value)
Definition: php/ext/google/protobuf/upb.h:2361
upb_strtable_count
UPB_INLINE size_t upb_strtable_count(const upb_strtable *t)
Definition: php/ext/google/protobuf/upb.h:2894
upb_pbdecoder_startbc
void * upb_pbdecoder_startbc(void *closure, const void *pc, size_t size_hint)
Definition: php/ext/google/protobuf/upb.c:7615
google_protobuf_FileOptions_LITE_RUNTIME
@ google_protobuf_FileOptions_LITE_RUNTIME
Definition: php/ext/google/protobuf/upb.h:1030
upb_handlerattr::alwaysok
bool alwaysok
Definition: php/ext/google/protobuf/upb.h:4089
upb_bufhandle::objtype
const void * objtype
Definition: php/ext/google/protobuf/upb.h:4107
upb_json_parser_create
upb_json_parser * upb_json_parser_create(upb_arena *a, const upb_json_parsermethod *m, const upb_symtab *symtab, upb_sink output, upb_status *status, bool ignore_json_unknown)
Definition: php/ext/google/protobuf/upb.c:12122
PUTVAL
#define PUTVAL(type, ctype)
Definition: php/ext/google/protobuf/upb.h:5678
google_protobuf_MethodOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2304
mgroup::methods
upb_inttable methods
Definition: php/ext/google/protobuf/upb.h:6521
google_protobuf_FileOptions_cc_enable_arenas
UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1901
upb_pbdecoder_skipunknown
int32_t upb_pbdecoder_skipunknown(upb_pbdecoder *d, int32_t fieldnum, uint8_t wire_type)
Definition: php/ext/google/protobuf/upb.c:7266
google_protobuf_FieldOptions_JS_STRING
@ google_protobuf_FieldOptions_JS_STRING
Definition: php/ext/google/protobuf/upb.h:1023
google_protobuf_GeneratedCodeInfo_Annotation_source_file
UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg)
Definition: php/ext/google/protobuf/upb.h:2552
upb_msglayout_field
Definition: php/ext/google/protobuf/upb.h:514
google_protobuf_MethodDescriptorProto_output_type
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1821
google_protobuf_DescriptorProto_ExtensionRange_serialize
UPB_INLINE char * google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1382
upb_handlers_setunknown
bool upb_handlers_setunknown(upb_handlers *h, upb_unknown_handlerfunc *func, const upb_handlerattr *attr)
Definition: php/ext/google/protobuf/upb.c:3484
google_protobuf_EnumValueOptions_has_deprecated
UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2213
upb_strtable_remove2
UPB_INLINE bool upb_strtable_remove2(upb_strtable *t, const char *key, size_t len, upb_value *val)
Definition: php/ext/google/protobuf/upb.h:2951
index
GLuint index
Definition: glcorearb.h:3055
google_protobuf_FieldDescriptorProto_type_name
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1501
upb_table::entries
const upb_tabent * entries
Definition: php/ext/google/protobuf/upb.h:2805
google_protobuf_FieldDescriptorProto_TYPE_STRING
@ google_protobuf_FieldDescriptorProto_TYPE_STRING
Definition: php/ext/google/protobuf/upb.h:1003
google_protobuf_FileOptions_java_outer_classname
UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1881
group
static uint32_t * group(tarjan *t, upb_refcounted *r)
Definition: ruby/ext/google/protobuf_c/upb.c:5943
UPB_DESCRIPTOR_TYPE_SFIXED64
@ UPB_DESCRIPTOR_TYPE_SFIXED64
Definition: php/ext/google/protobuf/upb.h:452
google_protobuf_DescriptorProto_mutable_extension
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_DescriptorProto_mutable_extension(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1308
upb_handlers
Definition: php/ext/google/protobuf/upb.c:3269
a
GLboolean GLboolean GLboolean GLboolean a
Definition: glcorearb.h:3228
upb_json_parser::status
upb_status * status
Definition: php/ext/google/protobuf/upb.c:9019
_upb_array_append_accessor
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)
Definition: php/ext/google/protobuf/upb.h:825
google_protobuf_FileDescriptorProto_mutable_extension
UPB_INLINE google_protobuf_FieldDescriptorProto ** google_protobuf_FileDescriptorProto_mutable_extension(google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1160
google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit
const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit
Definition: php/ext/google/protobuf/upb.c:213
google_protobuf_ServiceOptions_parse
UPB_INLINE google_protobuf_ServiceOptions * google_protobuf_ServiceOptions_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2241
google_protobuf_ServiceOptions_has_deprecated
UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2250
_upb_clearhas
UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx)
Definition: php/ext/google/protobuf/upb.h:847
upb_enumdef_iton
const char * upb_enumdef_iton(const upb_enumdef *e, int32_t num)
Definition: php/ext/google/protobuf/upb.c:1484
UPB_STARTMSG_SELECTOR
#define UPB_STARTMSG_SELECTOR
Definition: php/ext/google/protobuf/upb.h:4065
upb_bufsrc_putbuf
bool upb_bufsrc_putbuf(const char *buf, size_t len, upb_bytessink sink)
Definition: php/ext/google/protobuf/upb.c:4623
upb_handlerattr::handler_data
const void * handler_data
Definition: php/ext/google/protobuf/upb.h:4086
google_protobuf_MethodOptions_add_uninterpreted_option
UPB_INLINE struct google_protobuf_UninterpretedOption * google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2307
upb_handlertype_t
upb_handlertype_t
Definition: php/ext/google/protobuf/upb.h:4035
upb_msgval::flt
float flt
Definition: php/ext/google/protobuf/upb.h:567
google_protobuf_DescriptorProto_ExtensionRange_set_end
UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value)
Definition: php/ext/google/protobuf/upb.h:1397
upb_decoderet::val
uint64_t val
Definition: php/ext/google/protobuf/upb.h:6789
google_protobuf_FieldDescriptorProto_TYPE_BYTES
@ google_protobuf_FieldDescriptorProto_TYPE_BYTES
Definition: php/ext/google/protobuf/upb.h:1006
upb_mapiter_begin
void upb_mapiter_begin(upb_mapiter *i, const upb_map *t)
Definition: php/ext/google/protobuf/upb.c:4305
upb_startmsg_handlerfunc
bool upb_startmsg_handlerfunc(void *c, const void *)
Definition: php/ext/google/protobuf/upb.h:4130
google_protobuf_EnumValueDescriptorProto_has_name
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1720
google_protobuf_SourceCodeInfo_Location_mutable_span
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2475
upb_json_codecache_get
const upb_json_parsermethod * upb_json_codecache_get(upb_json_codecache *cache, const upb_msgdef *md)
Definition: php/ext/google/protobuf/upb.c:12192
upb_msglayout_field::label
uint8_t label
Definition: php/ext/google/protobuf/upb.h:520
upb_strview::size
size_t size
Definition: php/ext/google/protobuf/upb.h:537
Json::Int64
long long int Int64
Definition: json.h:240
upb_pbdecoder_checktag_slow
int32_t upb_pbdecoder_checktag_slow(upb_pbdecoder *d, uint64_t expected)
Definition: php/ext/google/protobuf/upb.c:7249
upb_inttable_insertptr2
bool upb_inttable_insertptr2(upb_inttable *t, const void *key, upb_value val, upb_alloc *a)
Definition: php/ext/google/protobuf/upb.c:5223
upb_fielddef_hassubdef
bool upb_fielddef_hassubdef(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1709
google_protobuf_FieldOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2113
number
double number
Definition: cJSON.h:326
upb_pbdecoder_packdispatch
UPB_INLINE uint64_t upb_pbdecoder_packdispatch(uint64_t ofs, uint8_t wt1, uint8_t wt2)
Definition: php/ext/google/protobuf/upb.h:6710
upb_endmsg_handlerfunc
bool upb_endmsg_handlerfunc(void *c, const void *, upb_status *status)
Definition: php/ext/google/protobuf/upb.h:4131
google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview val, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2499
upb_pbdecoder_frame::sink
upb_sink sink
Definition: php/ext/google/protobuf/upb.h:6554
google_protobuf_OneofOptions
struct google_protobuf_OneofOptions google_protobuf_OneofOptions
Definition: php/ext/google/protobuf/upb.h:947
google_protobuf_EnumDescriptorProto_EnumReservedRange_parse
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange * google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1682
google_protobuf_SourceCodeInfo_new
UPB_INLINE google_protobuf_SourceCodeInfo * google_protobuf_SourceCodeInfo_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2414
google_protobuf_FieldDescriptorProto_oneof_index
UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1507
google_protobuf_MethodDescriptorProto_new
UPB_INLINE google_protobuf_MethodDescriptorProto * google_protobuf_MethodDescriptorProto_new(upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1804
upb_msglayout_field::number
uint32_t number
Definition: php/ext/google/protobuf/upb.h:515
google_protobuf_FieldOptions_packed
UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2075
upb_fielddef_selectorbase
uint32_t upb_fielddef_selectorbase(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1572
upb_pb_encoder_input
upb_sink upb_pb_encoder_input(upb_pb_encoder *p)
Definition: php/ext/google/protobuf/upb.c:8368
upb_value_setdouble
UPB_INLINE void upb_value_setdouble(upb_value *val, double cval)
Definition: php/ext/google/protobuf/upb.h:2733
OP_TAG1
@ OP_TAG1
Definition: php/ext/google/protobuf/upb.h:6484
upb_descriptortype_t
upb_descriptortype_t
Definition: php/ext/google/protobuf/upb.h:436
UPB_DESCRIPTOR_TYPE_STRING
@ UPB_DESCRIPTOR_TYPE_STRING
Definition: php/ext/google/protobuf/upb.h:445
google_protobuf_UninterpretedOption_NamePart
struct google_protobuf_UninterpretedOption_NamePart google_protobuf_UninterpretedOption_NamePart
Definition: php/ext/google/protobuf/upb.h:953
upb_pbcodecache_get
const upb_pbdecodermethod * upb_pbcodecache_get(upb_pbcodecache *c, const upb_msgdef *md)
Definition: php/ext/google/protobuf/upb.c:6710
_upb_value_setval
UPB_INLINE void _upb_value_setval(upb_value *v, uint64_t val, upb_ctype_t ctype)
Definition: php/ext/google/protobuf/upb.h:2681
upb_msgdef
Definition: php/ext/google/protobuf/upb.c:1146
UPB_DESCRIPTOR_TYPE_DOUBLE
@ UPB_DESCRIPTOR_TYPE_DOUBLE
Definition: php/ext/google/protobuf/upb.h:437
upb_handlers_setint64
bool upb_handlers_setint64(upb_handlers *h, const upb_fielddef *f, upb_int64_handlerfunc *func, const upb_handlerattr *attr)
google_protobuf_MethodOptions_mutable_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:2301
upb_handlercache
Definition: php/ext/google/protobuf/upb.c:3648
upb_fieldtype_t
upb_fieldtype_t
Definition: php/ext/google/protobuf/upb.h:410
upb_pbdecoder::limit
upb_pbdecoder_frame * limit
Definition: php/ext/google/protobuf/upb.h:6640
google::protobuf::method
const Descriptor::ReservedRange const EnumValueDescriptor method
Definition: src/google/protobuf/descriptor.h:1973
upb_status::ok
bool ok
Definition: php/ext/google/protobuf/upb.h:171
google_protobuf_MessageOptions_map_entry
UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2024
google_protobuf_EnumOptions_resize_uninterpreted_option
UPB_INLINE google_protobuf_UninterpretedOption ** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2187
google_protobuf_DescriptorProto_ExtensionRange_options
const UPB_INLINE google_protobuf_ExtensionRangeOptions * google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg)
Definition: php/ext/google/protobuf/upb.h:1391
google_protobuf_DescriptorProto_mutable_reserved_name
UPB_INLINE upb_strview * google_protobuf_DescriptorProto_mutable_reserved_name(google_protobuf_DescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1360
upb_inttable_iter_isequal
bool upb_inttable_iter_isequal(const upb_inttable_iter *i1, const upb_inttable_iter *i2)
Definition: php/ext/google/protobuf/upb.c:5360
upb_pbdecoder_jit
void upb_pbdecoder_jit(mgroup *group)
h
GLfloat GLfloat GLfloat GLfloat h
Definition: glcorearb.h:4147
google_protobuf_DescriptorProto_set_name
UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_strview value)
Definition: php/ext/google/protobuf/upb.h:1252
descriptor_type
zend_class_entry * descriptor_type
benchmarks.python.py_benchmark.args
args
Definition: py_benchmark.py:24
_upb_sethas
UPB_INLINE bool _upb_sethas(const void *msg, size_t idx)
Definition: php/ext/google/protobuf/upb.h:843
UPB_CTYPE_DOUBLE
@ UPB_CTYPE_DOUBLE
Definition: php/ext/google/protobuf/upb.h:2653
google_protobuf_MethodDescriptorProto_set_server_streaming
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value)
Definition: php/ext/google/protobuf/upb.h:1858
google_protobuf_FileOptions_java_string_check_utf8
UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg)
Definition: php/ext/google/protobuf/upb.h:1899
google_protobuf_FileDescriptorProto_mutable_enum_type
UPB_INLINE google_protobuf_EnumDescriptorProto ** google_protobuf_FileDescriptorProto_mutable_enum_type(google_protobuf_FileDescriptorProto *msg, size_t *len)
Definition: php/ext/google/protobuf/upb.h:1134
upb_arena_init
upb_arena * upb_arena_init(void *mem, size_t n, upb_alloc *alloc)
Definition: php/ext/google/protobuf/upb.c:5725
google_protobuf_SourceCodeInfo_Location_resize_span
UPB_INLINE int32_t * google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:2478
upb_fielddef_isextension
bool upb_fielddef_isextension(const upb_fielddef *f)
Definition: php/ext/google/protobuf/upb.c:1556
google_protobuf_FileDescriptorProto_msginit
const upb_msglayout google_protobuf_FileDescriptorProto_msginit
Definition: php/ext/google/protobuf/upb.c:74
upb_msgval::map
const upb_map * map
Definition: php/ext/google/protobuf/upb.h:573
upb_pbdecoder_bytesparsed
uint64_t upb_pbdecoder_bytesparsed(const upb_pbdecoder *d)
Definition: php/ext/google/protobuf/upb.c:7754
upb_handlers_setuint64
bool upb_handlers_setuint64(upb_handlers *h, const upb_fielddef *f, upb_uint64_handlerfunc *func, const upb_handlerattr *attr)
google_protobuf_FileDescriptorSet_resize_file
UPB_INLINE google_protobuf_FileDescriptorProto ** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_arena *arena)
Definition: php/ext/google/protobuf/upb.h:1059
upb_msgdef_itof
const upb_fielddef * upb_msgdef_itof(const upb_msgdef *m, uint32_t i)
Definition: php/ext/google/protobuf/upb.c:1757
UPB_WELLKNOWN_DOUBLEVALUE
@ UPB_WELLKNOWN_DOUBLEVALUE
Definition: php/ext/google/protobuf/upb.h:3155
upb_enumdef_numvals
int upb_enumdef_numvals(const upb_enumdef *e)
Definition: php/ext/google/protobuf/upb.c:1462
upb_pbdecodermethod
Definition: php/ext/google/protobuf/upb.h:6574
ACCESSORS
#define ACCESSORS(name, membername, ctype)
Definition: php/ext/google/protobuf/upb.h:580
google_protobuf_FieldDescriptorProto_default_value
UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg)
Definition: php/ext/google/protobuf/upb.h:1503
upb_pbcodecache::allow_jit
bool allow_jit
Definition: php/ext/google/protobuf/upb.h:6507
upb_json_parsermethod_inputhandler
const upb_byteshandler * upb_json_parsermethod_inputhandler(const upb_json_parsermethod *m)
Definition: php/ext/google/protobuf/upb.c:12168
google_protobuf_EnumOptions_deprecated
UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg)
Definition: php/ext/google/protobuf/upb.h:2173
upb_sink_endmsg
UPB_INLINE bool upb_sink_endmsg(upb_sink s, upb_status *status)
Definition: php/ext/google/protobuf/upb.h:5741
upb_handlers_setstring
bool upb_handlers_setstring(upb_handlers *h, const upb_fielddef *f, upb_string_handlerfunc *func, const upb_handlerattr *attr)
upb_map
Definition: php/ext/google/protobuf/upb.c:4159


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:01