summaryrefslogtreecommitdiff
path: root/src/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2010-01-04 20:22:12 -0800
committerJoshua Haberman <joshua@reverberate.org>2010-01-04 20:22:12 -0800
commit6a8dfa5f26500b90aa9ecab418abba98d1e4e356 (patch)
tree0b1997d1107d010228552d0d4cafb229941f5125 /src/upb.h
parent8f2aeb808408c2687f7801f2f210a7b90ef25f12 (diff)
upb_array -> upb_arrayptr.
Diffstat (limited to 'src/upb.h')
-rw-r--r--src/upb.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/upb.h b/src/upb.h
index 2809418..2c0a23d 100644
--- a/src/upb.h
+++ b/src/upb.h
@@ -125,11 +125,10 @@ struct upb_tag {
// INTERNAL-ONLY: never refer to these types with a tag ("union", "struct").
// Always use the typedefs.
-union _upb_array;
struct _upb_msg;
-typedef union _upb_array upb_array;
typedef struct _upb_msg upb_msg;
+
typedef upb_atomic_refcount_t upb_data;
typedef uint32_t upb_strlen_t;
@@ -143,6 +142,15 @@ typedef union {
upb_data *base;
} upb_strptr;
+typedef uint32_t upb_arraylen_t;
+
+typedef union {
+ // Must be first, for the UPB_STATIC_ARRAY_PTR_INIT() macro.
+ struct upb_norefcount_array *norefcount;
+ struct upb_refcounted_array *refcounted;
+ upb_data *base;
+} upb_arrayptr;
+
// A single .proto value. The owner must have an out-of-band way of knowing
// the type, so that it knows which union member to use.
union upb_value {
@@ -154,7 +162,7 @@ union upb_value {
uint64_t uint64;
bool _bool;
upb_strptr str;
- upb_array *arr;
+ upb_arrayptr arr;
upb_msg *msg;
upb_data *data;
};
@@ -171,7 +179,7 @@ union upb_value_ptr {
uint64_t *uint64;
bool *_bool;
upb_strptr *str;
- upb_array **arr;
+ upb_arrayptr *arr;
upb_msg **msg;
upb_data **data;
void *_void;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback