summaryrefslogtreecommitdiff
path: root/upb/structdefs.int.h
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2016-04-19 15:41:33 -0700
committerJoshua Haberman <jhaberman@gmail.com>2016-04-19 15:41:33 -0700
commite6fa3f9d869765544b8e424e8573fe8d9af35534 (patch)
tree3e56beb3bd80470ddad130b2c7f703fb5bb6b5fd /upb/structdefs.int.h
parent68bc62a7fa5febbf5c8ab2fe8f6171121d18690f (diff)
Changed schema for JSON test to be defined in a .proto file. (#54)
* Changed schema for JSON test to be defined in a .proto file. Before we had lots of code to build these schemas manually, but this was verbose and made it difficult to add to the schema easily. Now we can just write a .proto file and adding fields is easy. To avoid making the tests depend on upbc (and thus Lua) we check in the generated schema. * Made protobuf-compiler a dependency of "make genfiles." * For genfiles download recent protoc that can handle proto3. * Only use new protoc for genfiles.
Diffstat (limited to 'upb/structdefs.int.h')
-rw-r--r--upb/structdefs.int.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/upb/structdefs.int.h b/upb/structdefs.int.h
index 467374a..da9a2ec 100644
--- a/upb/structdefs.int.h
+++ b/upb/structdefs.int.h
@@ -110,14 +110,10 @@ struct upb_msgdef {
/* Tables for looking up oneofs by name. */
upb_strtable ntoo; /* name to oneof */
- /* Is this a map-entry message?
- * TODO: set this flag properly for static descriptors; regenerate
- * descriptor.upb.c. */
+ /* Is this a map-entry message? */
bool map_entry;
- /* Whether this message has proto2 or proto3 semantics.
- * TODO: set this flag properly for static descriptors; regenerate
- * descriptor.upb.c. */
+ /* Whether this message has proto2 or proto3 semantics. */
upb_syntax_t syntax;
/* TODO(haberman): proper extension ranges (there can be multiple). */
@@ -126,11 +122,11 @@ struct upb_msgdef {
/* 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, \
- refs, ref2s) \
+ map_entry, syntax, refs, ref2s) \
{ \
UPB_DEF_INIT(name, UPB_DEF_MSG, refs, ref2s), selector_count, \
submsg_field_count, itof, ntof, \
- UPB_EMPTY_STRTABLE_INIT(UPB_CTYPE_PTR), false, true \
+ UPB_EMPTY_STRTABLE_INIT(UPB_CTYPE_PTR), map_entry, syntax \
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback