From cc396257679698852380822bc6bfb61d33244172 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 29 Dec 2009 18:39:51 -0800 Subject: Getting closer, only a few functions undefined now. --- src/upb.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/upb.h') 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; }; -- cgit v1.2.3