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

Unified Diff: mojo/public/tools/bindings/generators/python_templates/module_macros.tmpl

Issue 538613005: mojo: Start generating structs for python bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + fix constant array 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/generators/python_templates/module_macros.tmpl
diff --git a/components/domain_reliability/DEPS b/mojo/public/tools/bindings/generators/python_templates/module_macros.tmpl
similarity index 53%
copy from components/domain_reliability/DEPS
copy to mojo/public/tools/bindings/generators/python_templates/module_macros.tmpl
index bf04311edd5995c515fa0064f2297ab51be61c13..305b26a832ca59b6704fb1d38b171b577a87b468 100644
--- a/components/domain_reliability/DEPS
+++ b/mojo/public/tools/bindings/generators/python_templates/module_macros.tmpl
@@ -2,8 +2,10 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-include_rules = [
- "+net",
- "+components/keyed_service/core",
+{%- macro enum_values(enum) -%}
+[
+{% for field in enum.fields %}
+ ('{{field.name}}', {{field.computed_value}}),
+{% endfor %}
]
-
+{%- endmacro -%}

Powered by Google App Engine
This is Rietveld 408576698