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

Unified Diff: tools/json_schema_compiler/cpp_type_generator.py

Issue 10022005: Let json schema compiler handle using arrays as types (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 8 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_schema_compiler/cpp_type_generator.py
diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py
index 04e008051368f5e67974a04463ea715b70428c08..c3484b4df41df37c655effb2ffc3cdb479d6e060 100644
--- a/tools/json_schema_compiler/cpp_type_generator.py
+++ b/tools/json_schema_compiler/cpp_type_generator.py
@@ -177,7 +177,7 @@ class CppTypeGenerator(object):
c.Append('}')
c.Concat(self.GetNamespaceStart())
for (name, type_) in self._namespace.types.items():
- if not type_.functions:
+ if not type_.functions and type_.type_ != PropertyType.ARRAY:
c.Append('struct %s;' % name)
c.Concat(self.GetNamespaceEnd())
return c

Powered by Google App Engine
This is Rietveld 408576698