summaryrefslogtreecommitdiff
path: root/upb/msg.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2018-12-13 09:53:29 -0800
committerJoshua Haberman <jhaberman@gmail.com>2018-12-13 09:53:29 -0800
commit10e682cf2a0e8dcfd79f9dfbad5367f6b6bf8a61 (patch)
tree7cc129781f24070b9e3fdba060a92b591baa1ca1 /upb/msg.h
parent6bcdaa13528bd9b924705ae9835dd8f0ca0337d5 (diff)
Added hazzers.
Diffstat (limited to 'upb/msg.h')
-rw-r--r--upb/msg.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/upb/msg.h b/upb/msg.h
index 22811d8..c72e9f0 100644
--- a/upb/msg.h
+++ b/upb/msg.h
@@ -24,7 +24,6 @@
#include "upb/def.h"
#include "upb/handlers.h"
#include "upb/sink.h"
-#include "upb/structs.int.h"
#ifdef __cplusplus
@@ -210,31 +209,6 @@ bool upb_msg_clearfield(upb_msg *msg,
* semantics are the same as upb_msg. A upb_array allocates dynamic
* memory internally for the array elements. */
-UPB_INLINE const void *_upb_array_accessor(const upb_array *arr, size_t *size) {
- if (size) *size = arr->size;
- return arr->data;
-}
-
-UPB_INLINE void *_upb_array_mutable_accessor(upb_array *arr, size_t *size) {
- if (size) *size = arr->size;
- return arr->data;
-}
-
-UPB_INLINE void *_upb_array_resize_accessor(upb_array *arr, size_t size,
- size_t elem_size) {
- if (size > arr->size) {
- size_t new_size = UPB_MAX(arr->size, 4);
- size_t old_bytes = arr->size * elem_size;
- size_t new_bytes;
- upb_alloc *alloc = upb_arena_alloc(arr->arena);
- while (new_size < size) new_size *= 2;
- new_bytes = new_size * elem_size;
- arr->data = upb_realloc(alloc, arr->data, old_bytes, new_bytes);
- }
- arr->len = size;
- return arr->data;
-}
-
upb_array *upb_array_new(upb_fieldtype_t type, upb_arena *a);
upb_fieldtype_t upb_array_type(const upb_array *arr);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback