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

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

Issue 545433002: mojo: Generate top level enums for python bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unhelpful conditional Created 6 years, 3 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
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 dd5ece9c1d2978a913685f53594a2c862b55641e..8939d932f8b94bb95a5f0e2cc8b3997b3217c3d0 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -152,12 +152,12 @@ class BuiltinValue(object):
class EnumValue(NamedValue):
def __init__(self, module, enum, field):
NamedValue.__init__(self, module, enum.parent_kind, field.name)
- self.enum_name = enum.name
+ self.enum = enum
def GetSpec(self):
return (self.namespace + '.' +
(self.parent_kind and (self.parent_kind.name + '.') or "") +
- self.enum_name + '.' + self.name)
+ self.enum.name + '.' + self.name)
class Constant(object):

Powered by Google App Engine
This is Rietveld 408576698