diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2015-10-21 16:53:36 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2015-10-21 16:53:36 -0700 |
commit | a1c8f7ce7cd367696281a16ee54844b19e125328 (patch) | |
tree | 098a899c808717b2bc1260b2793f4027ec29cda7 /upb/structdefs.int.h | |
parent | 77d45edfb39171aef5e0ae09a471e5d8e2679a7f (diff) | |
parent | c1bc256d4e57863d8e4d1f30b8e5ca2bb0e61896 (diff) |
Merge pull request #43 from haberman/presenceflag
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 \ } |