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 0a2dc89003cb3d23f8f377f13bb2654a2d881e5c..01718bebb743f03d92fc402cf530544a48c79d2f 100644 |
--- a/tools/json_schema_compiler/h_generator.py |
+++ b/tools/json_schema_compiler/h_generator.py |
@@ -144,7 +144,7 @@ class _Generator(object): |
c.Sblock('enum %s {' % enum_name) |
c.Append(self._type_helper.GetEnumNoneValue(type_) + ',') |
for value in type_.enum_values: |
- c.Append(self._type_helper.GetEnumValue(type_, value) + ',') |
+ c.Append(self._type_helper.GetEnumValue(type_, value['name']) + ',') |
not at google - send to devlin
2013/10/28 18:00:25
maybe GetEnumValue should take the enum not enum['
Sam McNally
2013/10/29 00:39:02
Done.
|
return c.Eblock('};') |
def _GenerateFields(self, props): |
@@ -208,7 +208,7 @@ class _Generator(object): |
c.Sblock('enum %(classname)s {') |
c.Append('%s,' % self._type_helper.GetEnumNoneValue(type_)) |
for value in type_.enum_values: |
- c.Append('%s,' % self._type_helper.GetEnumValue(type_, value)) |
+ c.Append('%s,' % self._type_helper.GetEnumValue(type_, value['name'])) |
# Top level enums are in a namespace scope so the methods shouldn't be |
# static. On the other hand, those declared inline (e.g. in an object) do. |
maybe_static = '' if is_toplevel else 'static ' |