Index: mojo/public/python/mojo/bindings/descriptor.py |
diff --git a/mojo/public/python/mojo/bindings/descriptor.py b/mojo/public/python/mojo/bindings/descriptor.py |
index 0c97c06e8370ae91679b38e10969e17d38b7434d..44c0f395432f273298aebc50c8740be6fb8880a6 100644 |
--- a/mojo/public/python/mojo/bindings/descriptor.py |
+++ b/mojo/public/python/mojo/bindings/descriptor.py |
@@ -416,8 +416,8 @@ class MapType(SerializableType): |
'__module__': __name__, |
'DESCRIPTOR': { |
'fields': [ |
- SingleFieldGroup('keys', GenericArrayType(key_type), 0, 0), |
- SingleFieldGroup('values', GenericArrayType(value_type), 1, 1), |
+ SingleFieldGroup('keys', MapType._GetArrayType(key_type), 0, 0), |
+ SingleFieldGroup('values', MapType._GetArrayType(value_type), 1, 1), |
], |
} |
} |
@@ -452,6 +452,13 @@ class MapType(SerializableType): |
return dict(zip(s.keys, s.values)) |
return None |
+ @staticmethod |
+ def _GetArrayType(t): |
+ if t == TYPE_BOOL: |
+ return BooleanArrayType() |
+ else: |
+ return GenericArrayType(t) |
+ |
class NoneType(SerializableType): |
"""Placeholder type, used temporarily until all mojo types are handled.""" |