summaryrefslogtreecommitdiff
path: root/src/upb_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/upb_def.h')
-rw-r--r--src/upb_def.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/upb_def.h b/src/upb_def.h
index 3f79895..4a2bcbd 100644
--- a/src/upb_def.h
+++ b/src/upb_def.h
@@ -227,10 +227,13 @@ INLINE upb_fielddef *upb_msg_iter_field(upb_msg_iter iter) {
/* upb_enumdef ****************************************************************/
+typedef int32_t upb_enumval_t;
+
typedef struct _upb_enumdef {
upb_def base;
upb_strtable ntoi;
upb_inttable iton;
+ upb_enumval_t default_value; // The first value listed in the enum.
} upb_enumdef;
typedef struct {
@@ -243,8 +246,6 @@ typedef struct {
upb_string *string;
} upb_iton_ent;
-typedef int32_t upb_enumval_t;
-
// Lookups from name to integer and vice-versa.
bool upb_enumdef_ntoi(upb_enumdef *e, upb_string *name, upb_enumval_t *num);
// Caller does not own a ref on the returned string.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback