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

Unified Diff: tools/json_to_struct/json_to_struct.py

Issue 1209733002: Add the ability to code generated prepopulated static nested structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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: tools/json_to_struct/json_to_struct.py
diff --git a/tools/json_to_struct/json_to_struct.py b/tools/json_to_struct/json_to_struct.py
index 2e9c83c726fb23a28a232cfd24312efdac4b841f..831c739498d0f62f85467b02a272cb00f64aa905 100755
--- a/tools/json_to_struct/json_to_struct.py
+++ b/tools/json_to_struct/json_to_struct.py
@@ -119,7 +119,7 @@ def _GenerateH(basepath, fileroot, head, namespace, schema, description):
schema['type_name'], schema['schema']))
f.write('\n')
- for var_name, value in description.get('int_variables', []).items():
+ for var_name, value in description.get('int_variables', {}).items():
f.write('extern const int %s;\n' % var_name)
f.write('\n')

Powered by Google App Engine
This is Rietveld 408576698