summaryrefslogtreecommitdiff
path: root/upb/structdefs.int.h
diff options
context:
space:
mode:
authorPaul Yang <TeBoring@users.noreply.github.com>2018-09-18 09:53:38 -0700
committerGitHub <noreply@github.com>2018-09-18 09:53:38 -0700
commit706ffdbc658e00fdf0d03715c8306eb7e7b7e963 (patch)
tree7f0436f014dac5907cb3e307307609915f18b04d /upb/structdefs.int.h
parent427168995343ceed2f505460d305e4b71d41a0a4 (diff)
Fix json encoding for wrappers, ListValue, Struct and Value. (#126)
* Fix json encoding for wrappers, ListValue, Struct and Value. * Add well_known_type field in upb_msgdef to specify type of well known messages. * Remove comma at end of enum definition. * Group number wrappers * Fix comments * Refactoring to use is_wellknown_{msg/field}
Diffstat (limited to 'upb/structdefs.int.h')
-rw-r--r--upb/structdefs.int.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/upb/structdefs.int.h b/upb/structdefs.int.h
index ff44e2d..cf8bd1d 100644
--- a/upb/structdefs.int.h
+++ b/upb/structdefs.int.h
@@ -115,6 +115,10 @@ struct upb_msgdef {
/* Whether this message has proto2 or proto3 semantics. */
upb_syntax_t syntax;
+ /* Type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for
+ * non-well-known message. */
+ upb_wellknowntype_t well_known_type;
+
/* TODO(haberman): proper extension ranges (there can be multiple). */
};
@@ -123,10 +127,11 @@ extern const struct upb_refcounted_vtbl upb_msgdef_vtbl;
/* TODO: also support static initialization of the oneofs table. This will be
* needed if we compile in descriptors that contain oneofs. */
#define UPB_MSGDEF_INIT(name, selector_count, submsg_field_count, itof, ntof, \
- map_entry, syntax, refs, ref2s) \
+ map_entry, syntax, well_known_type, refs, ref2s) \
{ \
UPB_DEF_INIT(name, UPB_DEF_MSG, &upb_fielddef_vtbl, refs, ref2s), \
- selector_count, submsg_field_count, itof, ntof, map_entry, syntax \
+ selector_count, submsg_field_count, itof, ntof, map_entry, syntax, \
+ well_known_type \
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback