diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-05-12 09:58:02 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2017-05-12 09:58:02 -0400 |
commit | 5ab83cb6e3acaf435d0d792cf8b5360eac47ce2e (patch) | |
tree | 578ddd429cc097fa00f81ed4a493b1932232ecb1 /buildscripts/idl | |
parent | 638339bd4de36914e7e15d17c43bce99b2faf36d (diff) | |
download | mongo-5ab83cb6e3acaf435d0d792cf8b5360eac47ce2e.tar.gz |
SERVER-29089 Add UUID to IDL basic_types.idl
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(): |