From 0124bfd8fe87cb38fe367478d18f449edce8a0ae Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 21 Jun 2009 17:58:23 -0700 Subject: More work on inttable/strtable (not finished). --- upb_struct.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'upb_struct.h') diff --git a/upb_struct.h b/upb_struct.h index d46b007..72a1d21 100644 --- a/upb_struct.h +++ b/upb_struct.h @@ -67,29 +67,23 @@ struct upb_struct_field *upb_struct_find_field_by_number( /* Variable-length data (strings and arrays).**********************************/ -/* Represents a string or bytes. */ -struct upb_string { - size_t byte_len; - void *data; -}; - /* Represents an array (a repeated field) of any type. The interpretation of * the data in the array depends on the type. */ struct upb_array { - size_t len; /* Measured in elements. */ void *data; /* Size of individual elements is based on type. */ + uint32_t len; /* Measured in elements. */ }; /* A generic array of structs, using void* instead of specific types. */ struct upb_struct_array { - size_t len; void **elements; + uint32_t len; }; /* An array of strings. */ struct upb_string_array { - size_t len; struct upb_string **elements; + uint32_t len; }; /* Specific arrays of all the primitive types. */ -- cgit v1.2.3