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 |