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

Unified Diff: tools/json_schema_compiler/h_generator.py

Issue 9309044: Supporting more APIs with json_schema_compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rework, add a couple of tests Created 8 years, 10 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
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/h_generator.py
diff --git a/tools/json_schema_compiler/h_generator.py b/tools/json_schema_compiler/h_generator.py
index ed85dd55d23cbfacf55825fb9eb798cf03f8a05a..253a4d14272f78bfceaa8e5b5d4d39dcc3eb1747 100644
--- a/tools/json_schema_compiler/h_generator.py
+++ b/tools/json_schema_compiler/h_generator.py
@@ -97,7 +97,7 @@ class HGenerator(object):
c.Append(self._cpp_type_generator.GetChoiceEnumNoneValue(prop) + ',')
for choice in prop.choices.values():
c.Append(
- self._cpp_type_generator.GetChoiceEnumValue( prop, choice.type_)
+ self._cpp_type_generator.GetChoiceEnumValue(prop, choice.type_)
+ ',')
(c.Eblock('};')
.Append()
@@ -196,9 +196,10 @@ class HGenerator(object):
for param in self._cpp_type_generator.GetExpandedChoicesInParams(params):
if param.description:
c.Comment(param.description)
- c.Append('Value* Create(%s);' %
- cpp_util.GetConstParameterDeclaration(
- param, self._cpp_type_generator))
+ if param.type_ == PropertyType.OBJECT:
+ raise NotImplementedError('OBJECT return type not supported')
+ c.Append('Value* Create(%s);' % cpp_util.GetParameterDeclaration(
+ param, self._cpp_type_generator.GetType(param)))
c.Eblock('};')
return c
« no previous file with comments | « tools/json_schema_compiler/cpp_util.py ('k') | tools/json_schema_compiler/model.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698