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

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

Issue 576603002: Revert of mojo: Starting serialization for python bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 {% from "module_macros.tmpl" import enum_values %} 1 {% from "module_macros.tmpl" import enum_values %}
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import mojo.bindings.descriptor as _descriptor 6 import mojo.bindings.descriptor as _descriptor
7 import mojo.bindings.reflection as _reflection 7 import mojo.bindings.reflection as _reflection
8 {% if imports %} 8 {% if imports %}
9 9
10 {% for import in imports %} 10 {% for import in imports %}
(...skipping 28 matching lines...) Expand all
39 {% if struct.enums %} 39 {% if struct.enums %}
40 'enums': { 40 'enums': {
41 {% for enum in struct.enums %} 41 {% for enum in struct.enums %}
42 '{{enum|name}}': {{enum_values(enum)|indent(6)}}, 42 '{{enum|name}}': {{enum_values(enum)|indent(6)}},
43 {% endfor %} 43 {% endfor %}
44 }, 44 },
45 {% endif %} 45 {% endif %}
46 {% if struct.fields %} 46 {% if struct.fields %}
47 'fields': [ 47 'fields': [
48 {% for byte in struct.bytes %} 48 {% for byte in struct.bytes %}
49 {% if byte.packed_fields %} 49 {% for packed_field in byte.packed_fields %}
50 {{byte|field_group}}, 50 {{packed_field|field_descriptor}},
51 {% endif %} 51 {% endfor %}
52 {% endfor %} 52 {% endfor %}
53 ], 53 ],
54 {% endif %} 54 {% endif %}
55 } 55 }
56 {% endfor %} 56 {% endfor %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698