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

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

Issue 570563002: mojo: Starting serialization for python bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow review 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.py.tmpl
diff --git a/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl b/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl
index 86ecf93104185592f4344ab9c2a5666db886ce74..d5bff304836aec1b0708ab6752a9a35e28a1f2c2 100644
--- a/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl
+++ b/mojo/public/tools/bindings/generators/python_templates/module.py.tmpl
@@ -46,9 +46,9 @@ class {{struct|name}}(object):
{% if struct.fields %}
'fields': [
{% for byte in struct.bytes %}
-{% for packed_field in byte.packed_fields %}
- {{packed_field|field_descriptor}},
-{% endfor %}
+{% if byte.packed_fields %}
+ {{byte|field_group}},
+{% endif %}
{% endfor %}
],
{% endif %}

Powered by Google App Engine
This is Rietveld 408576698