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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/module.py

Issue 2031823002: Mojo C++ bindings: more consistent Clone() and Equals(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/pylib/mojom/generate/module.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index 16bdf27eab850c86950ccbc57e74ac77db659810..02ea2dd5c425fb13afe82d6b6c1e3e633cb2f67f 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -791,31 +791,6 @@ def IsMoveOnlyKind(kind):
IsAnyHandleKind(kind) or IsInterfaceKind(kind) or IsAssociatedKind(kind)
-def IsCloneableKind(kind, filter):
- def _IsCloneable(kind, visited_kinds):
- if kind in visited_kinds:
- # No need to examine the kind again.
- return True
- visited_kinds.add(kind)
- if IsAnyHandleKind(kind) or IsInterfaceKind(kind) or IsAssociatedKind(kind):
- return False
- if IsArrayKind(kind):
- return _IsCloneable(kind.kind, visited_kinds)
- if IsStructKind(kind) or IsUnionKind(kind):
- if IsStructKind(kind) and filter(kind):
- return False
- for field in kind.fields:
- if not _IsCloneable(field.kind, visited_kinds):
- return False
- if IsMapKind(kind):
- # No need to examine the key kind, only primitive kinds and non-nullable
- # string are allowed to be key kinds.
- return _IsCloneable(kind.value_kind, visited_kinds)
- return True
-
- return _IsCloneable(kind, set())
-
-
def HasCallbacks(interface):
for method in interface.methods:
if method.response_parameters != None:
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698