summaryrefslogtreecommitdiff
path: root/src/upb.h
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-12-29 18:39:51 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-12-29 18:39:51 -0800
commitcc396257679698852380822bc6bfb61d33244172 (patch)
treea8aa652251198a9a47bcd2434ae490140accb986 /src/upb.h
parent2876225d0547ea7833991b9da8a72427e4bc69b9 (diff)
Getting closer, only a few functions undefined now.
Diffstat (limited to 'src/upb.h')
-rw-r--r--src/upb.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/upb.h b/src/upb.h
index aeef349..158d631 100644
--- a/src/upb.h
+++ b/src/upb.h
@@ -122,9 +122,15 @@ struct upb_tag {
/* Polymorphic values of .proto types *****************************************/
+// INTERNAL-ONLY: never refer to these types with a tag ("union", "struct").
+// Always use the typedefs.
union upb_string;
union upb_array;
-union upb_msg;
+struct upb_msg;
+
+typedef union upb_string upb_string;
+typedef union upb_array upb_array;
+typedef struct upb_msg upb_msg;
// 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.
@@ -138,7 +144,7 @@ union upb_value {
bool _bool;
union upb_string *str;
union upb_array *arr;
- union upb_msg *msg;
+ struct upb_msg *msg;
};
// A pointer to a .proto value. The owner must have an out-of-band way of
@@ -148,12 +154,13 @@ union upb_value_ptr {
float *_float;
int32_t *int32;
int64_t *int64;
+ uint8_t *uint8;
uint32_t *uint32;
uint64_t *uint64;
bool *_bool;
union upb_string **str;
union upb_array **arr;
- union upb_msg **msg;
+ struct upb_msg **msg;
void *_void;
};
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback