diff options
author | Josh Haberman <jhaberman@gmail.com> | 2015-10-14 18:02:34 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2015-10-14 18:02:34 -0700 |
commit | bc53c1bc4621e172a20fb0966c7ee9342d9a8dda (patch) | |
tree | 37d3be5287e3078cfa35efc81634977236000c5a /upb/structdefs.int.h | |
parent | 77d45edfb39171aef5e0ae09a471e5d8e2679a7f (diff) |
Add flag to MessageDef for whether fields have presence.
Diffstat (limited to 'upb/structdefs.int.h')
-rw-r--r-- | upb/structdefs.int.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/upb/structdefs.int.h b/upb/structdefs.int.h index e650c32..b7b36fa 100644 --- a/upb/structdefs.int.h +++ b/upb/structdefs.int.h @@ -114,6 +114,11 @@ struct upb_msgdef { * descriptor.upb.c. */ bool map_entry; + /* Do primitive values in this message have explicit presence or not? + * TODO: set this flag properly for static descriptors; regenerate + * descriptor.upb.c. */ + bool primitives_have_presence; + /* TODO(haberman): proper extension ranges (there can be multiple). */ }; @@ -124,7 +129,7 @@ struct upb_msgdef { { \ UPB_DEF_INIT(name, UPB_DEF_MSG, refs, ref2s), selector_count, \ submsg_field_count, itof, ntof, \ - UPB_EMPTY_STRTABLE_INIT(UPB_CTYPE_PTR), false \ + UPB_EMPTY_STRTABLE_INIT(UPB_CTYPE_PTR), false, true \ } |