Chromium Code Reviews| Index: mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
| diff --git a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
| index aede1a72a9a1a16ee573d17a136f4216b0b77e2f..4f2a056d78ec8329c6abc0121e88b474f4debce1 100644 |
| --- a/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
| +++ b/mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl |
| @@ -3,7 +3,7 @@ |
| {%- set data_type = struct|get_qualified_name_for_kind(internal=True) %} |
| template <> |
| -struct StructTraits<{{mojom_type}}, {{mojom_type}}Ptr> { |
| +struct {{export_attribute}} StructTraits<{{mojom_type}}, {{mojom_type}}Ptr> { |
|
yzshen1
2016/08/08 17:07:32
Please also add export_attribute to
- enum_seriali
jam
2016/08/08 17:36:08
Done
yzshen1
2016/08/08 17:42:16
Thanks! Is it because it is a non-template class a
|
| static bool IsNull(const {{mojom_type}}Ptr& input) { return !input; } |
| static void SetToNull({{mojom_type}}Ptr* output) { output->reset(); } |
| @@ -29,7 +29,7 @@ struct StructTraits<{{mojom_type}}, {{mojom_type}}Ptr> { |
| namespace internal { |
| template <typename MaybeConstUserType> |
| -struct Serializer<{{mojom_type}}Ptr, MaybeConstUserType> { |
| +struct {{export_attribute}} Serializer<{{mojom_type}}Ptr, MaybeConstUserType> { |
| using UserType = typename std::remove_const<MaybeConstUserType>::type; |
| using Traits = StructTraits<{{mojom_type}}, UserType>; |