diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-11-10 13:59:04 +0000 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-11-10 14:00:27 +0000 |
commit | c29b1e356a47212b61aae5476f9b058379474f07 (patch) | |
tree | dd772e7ac3d465e93d74161d7694a023c243cc46 /tools | |
parent | e37c5871ef6c4ed254e2b6ec046eb5afe20dce93 (diff) |
specparser: complain if tp:mapping's specified type is a lie
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/specparser.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/specparser.py b/tools/specparser.py index be0d499a..3ad1f9a3 100644 --- a/tools/specparser.py +++ b/tools/specparser.py @@ -1057,6 +1057,13 @@ class Mapping(StructLike): # rewrite the D-Bus type self.dbus_type = 'a{%s}' % ''.join(map(lambda m: m.dbus_type, self.members)) + # not sure why tp:mapping sometimes has a type attribute, but + # make sure it's right. + t = dom.getAttribute('type') + if t and self.dbus_type != t: + raise TypeMismatch('%r reports type is %s but actual type is %s' + % (self, t, self.dbus_type)) + class Struct(StructLike): devhelp_name = "struct" |