summaryrefslogtreecommitdiff
path: root/upb_msg.h
diff options
context:
space:
mode:
Diffstat (limited to 'upb_msg.h')
-rw-r--r--upb_msg.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/upb_msg.h b/upb_msg.h
index c6a3766..4f06119 100644
--- a/upb_msg.h
+++ b/upb_msg.h
@@ -47,12 +47,11 @@ extern "C" {
/* Structure definition. ******************************************************/
-/* One single field of the struct. */
struct upb_msg_field {
uint32_t byte_offset; /* Where to find the data. */
uint16_t isset_byte_offset; /* The byte where the "set" bit lives. */
uint8_t isset_byte_mask;
- uint8_t type; /* Copied from the descriptor for cache-friendliness. */
+ upb_field_type_t type; /* Copied from descriptor for cache-friendliness. */
struct google_protobuf_FieldDescriptorProto *descriptor;
union {
struct upb_msg *msg;
@@ -60,7 +59,6 @@ struct upb_msg_field {
} ref;
};
-/* Definition of a complete struct. */
struct upb_msg {
struct google_protobuf_DescriptorProto *descriptor;
size_t size;
@@ -72,6 +70,9 @@ struct upb_msg {
struct upb_msg_field fields[];
};
+void upb_msg_init(struct upb_msg *m, struct google_protobuf_DescriptorProto *d);
+void upb_msg_free(struct upb_msg *m);
+
/* While these are written to be as fast as possible, it will still be faster
* to cache the results of this lookup if possible. These return NULL if no
* such field is found. */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback