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 4cc0e6f89baeff52345d8d9172c066da12e75cfc..4c33fadf9811695fa11c79001be5ba9ad7511d61 100644 |
--- a/tools/json_schema_compiler/h_generator.py |
+++ b/tools/json_schema_compiler/h_generator.py |
@@ -159,8 +159,9 @@ class HGenerator(object): |
if prop.description: |
c.Comment(prop.description) |
(c.Append('%s %s;' % ( |
- self._cpp_type_generator.GetType(prop, wrap_optional=True), |
- prop.unix_name)) |
+ self._cpp_type_generator.GetType(prop, wrap_optional=True, |
+ convert_type=True), |
+ prop.unix_name)) |
.Append() |
) |
return c |
@@ -184,7 +185,8 @@ class HGenerator(object): |
c.Append('typedef std::vector<%(item_type)s> %(classname)s;') |
c.Substitute({'classname': classname, 'item_type': |
self._cpp_type_generator.GetType(type_.item_type, |
- wrap_optional=True)}) |
+ wrap_optional=True, |
+ convert_type=True)}) |
elif type_.type_ == PropertyType.STRING: |
if type_.description: |
c.Comment(type_.description) |
@@ -293,7 +295,7 @@ class HGenerator(object): |
[choice.type_.name for choice in prop.choices.values()])) |
c.Concat(self._GeneratePropertyStructures(prop.choices.values())) |
elif prop.type_ == PropertyType.ENUM: |
- enum_name = self._cpp_type_generator.GetType(prop) |
+ enum_name = self._cpp_type_generator.GetType(prop, convert_type=True) |
c.Concat(self._GenerateEnumDeclaration( |
enum_name, |
prop, |
@@ -338,7 +340,7 @@ class HGenerator(object): |
if param.description: |
c.Comment(param.description) |
declaration_list.append('const %s' % cpp_util.GetParameterDeclaration( |
- param, self._cpp_type_generator.GetType(param))) |
+ param, self._cpp_type_generator.GetType(param, convert_type=True))) |
c.Append('scoped_ptr<base::ListValue> Create(%s);' % |
', '.join(declaration_list)) |
return c |