diff options
Diffstat (limited to 'buildscripts/idl')
-rw-r--r-- | buildscripts/idl/idl/cpp_types.py | 8 | ||||
-rw-r--r-- | buildscripts/idl/idl/parser.py | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/buildscripts/idl/idl/cpp_types.py b/buildscripts/idl/idl/cpp_types.py index 089c8073623..c147c746f22 100644 --- a/buildscripts/idl/idl/cpp_types.py +++ b/buildscripts/idl/idl/cpp_types.py @@ -599,8 +599,12 @@ class _BinDataBsonCppTypeBase(BsonCppTypeBase): def gen_deserializer_expression(self, indented_writer, object_instance): # type: (writer.IndentedTextWriter, unicode) -> unicode - return common.template_args( - '${object_instance}._binDataVector()', object_instance=object_instance) + if self._field.bindata_subtype == 'uuid': + return common.template_args( + '${object_instance}.uuid()', object_instance=object_instance) + else: + return common.template_args( + '${object_instance}._binDataVector()', object_instance=object_instance) def has_serializer(self): # type: () -> bool diff --git a/buildscripts/idl/idl/parser.py b/buildscripts/idl/idl/parser.py index 10ce47b1479..e4ce345b908 100644 --- a/buildscripts/idl/idl/parser.py +++ b/buildscripts/idl/idl/parser.py @@ -465,6 +465,11 @@ def parse(stream, input_file_name, resolver): imports += [(parsed_doc.spec.imports, resolved_file_name, import_file_name) for import_file_name in parsed_doc.spec.imports.imports] + # Merge cpp_includes as needed + if parsed_doc.spec.globals and parsed_doc.spec.globals.cpp_includes: + root_doc.spec.globals.cpp_includes = list( + set(root_doc.spec.globals.cpp_includes + parsed_doc.spec.globals.cpp_includes)) + # Merge symbol tables together root_doc.spec.symbols.add_imported_symbol_table(ctxt, parsed_doc.spec.symbols) if ctxt.errors.has_errors(): |