summaryrefslogtreecommitdiff
path: root/core/upb_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/upb_def.h')
-rw-r--r--core/upb_def.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/core/upb_def.h b/core/upb_def.h
index ae9e0fa..5c19a7a 100644
--- a/core/upb_def.h
+++ b/core/upb_def.h
@@ -87,23 +87,27 @@ INLINE void upb_def_unref(upb_def *def) {
// is either a field of a upb_msgdef or contained inside a upb_extensiondef.
// It is also reference-counted.
typedef struct _upb_fielddef {
- upb_atomic_refcount_t refcount;
- upb_string *name;
- upb_field_number_t number;
- upb_field_type_t type;
- upb_label_t label;
upb_value default_value;
+ upb_string *name;
+
+ struct _upb_msgdef *msgdef;
+
// For the case of an enum or a submessage, points to the def for that type.
upb_def *def;
- // True if we own a ref on "def" (above). This is true unless this edge is
- // part of a cycle.
- bool owned;
+ upb_atomic_refcount_t refcount;
+ uint32_t byte_offset; // Where in a upb_msg to find the data.
// These are set only when this fielddef is part of a msgdef.
- uint32_t byte_offset; // Where in a upb_msg to find the data.
upb_field_count_t field_index; // Indicates set bit.
+
+ upb_field_number_t number;
+ upb_field_type_t type;
+ upb_label_t label;
+ // True if we own a ref on "def" (above). This is true unless this edge is
+ // part of a cycle.
+ bool owned;
} upb_fielddef;
// A variety of tests about the type of a field.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback