Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: mojo/public/tools/bindings/generators/mojom_cpp_generator.py

Issue 1768373003: Treat typemapped kinds as un-cloneable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | mojo/public/tools/bindings/pylib/mojom/generate/module.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/mojom_cpp_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
index 22e089ccae7483bb608b9b423f446690752a49f7..c2d3a1c3d83ce632e8063233d2f40a31f060c2bf 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -105,6 +105,9 @@ def IsTypemappedKind(kind):
return hasattr(kind, "name") and \
GetFullMojomNameForKind(kind) in _current_typemap
+def IsCloneableKind(kind):
+ return mojom.IsCloneableKind(kind, IsTypemappedKind)
+
def IsNativeOnlyKind(kind):
return mojom.IsStructKind(kind) and kind.native_only
@@ -477,7 +480,7 @@ class Generator(generator.Generator):
"should_inline": ShouldInlineStruct,
"should_inline_union": ShouldInlineUnion,
"is_array_kind": mojom.IsArrayKind,
- "is_cloneable_kind": mojom.IsCloneableKind,
+ "is_cloneable_kind": IsCloneableKind,
"is_enum_kind": mojom.IsEnumKind,
"is_integral_kind": mojom.IsIntegralKind,
"is_move_only_kind": mojom.IsMoveOnlyKind,
« no previous file with comments | « no previous file | mojo/public/tools/bindings/pylib/mojom/generate/module.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698