Index: Source/bindings/scripts/v8_union.py |
diff --git a/Source/bindings/scripts/v8_union.py b/Source/bindings/scripts/v8_union.py |
index 177394ea23e57d6ad0484a2103b99c78ffec8432..d963c0cbb1f2a95d32a6657d4d2d087f6d184018 100644 |
--- a/Source/bindings/scripts/v8_union.py |
+++ b/Source/bindings/scripts/v8_union.py |
@@ -27,9 +27,11 @@ cpp_includes = set() |
header_forward_decls = set() |
-def union_context(union_types, interfaces_info): |
+def union_context(union_types, interfaces_info, component): |
bashi
2015/04/01 07:16:51
nit: we generally put component-specific logic in
tasak
2015/04/02 05:31:36
Done.
|
cpp_includes.clear() |
header_forward_decls.clear() |
+ header_includes = set() |
+ header_includes.update(UNION_H_INCLUDES) |
# For container classes we strip nullable wrappers. For example, |
# both (A or B)? and (A? or B) will become AOrB. This should be OK |
@@ -49,14 +51,16 @@ def union_context(union_types, interfaces_info): |
union_types_for_containers = sorted(union_types_for_containers, |
key=lambda union_type: union_type.cpp_type) |
nullable_cpp_types = sorted(nullable_cpp_types) |
+ header_includes.add('%s/%sExport.h' % (component, component.capitalize())) |
bashi
2015/04/01 07:16:51
nit: how about adding ComonentInfo.include_path_fo
tasak
2015/04/02 05:31:36
Done.
|
return { |
'containers': [container_context(union_type, interfaces_info) |
for union_type in union_types_for_containers], |
'cpp_includes': sorted(cpp_includes - UNION_CPP_INCLUDES_BLACKLIST), |
'header_forward_decls': sorted(header_forward_decls), |
- 'header_includes': sorted(UNION_H_INCLUDES), |
+ 'header_includes': sorted(header_includes), |
'nullable_cpp_types': nullable_cpp_types, |
+ 'exported': '%s_EXPORT ' % component.upper(), |
bashi
2015/04/01 07:16:51
nit: I'd prefer dropping the trailing space and ad
bashi
2015/04/01 07:16:51
nit: alphabetical order.
tasak
2015/04/02 05:31:36
Moved 'exported' in the almost same way as Compone
tasak
2015/04/02 05:31:36
Temporarily I would like to use the trailing space
|
} |