summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEitan Isaacson <eitan@monotonous.org>2011-05-14 21:38:45 -0400
committerEitan Isaacson <eitan@monotonous.org>2011-05-24 13:04:11 -0700
commit0921f78660b7b0784ebe2fa586dd54551704699e (patch)
treeceb2bf334479a2d70972d513799d51aeff14ae59 /tools
parentc1a605a2451f14e05ee3aa6a2bdfaabf336c4f2a (diff)
downloadcaribou-0921f78660b7b0784ebe2fa586dd54551704699e.tar.gz
Fix fix_gir.py to work with ginterfaces and to support delegates.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/fix_gir.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/fix_gir.py b/tools/fix_gir.py
index 31190e3..3e08489 100755
--- a/tools/fix_gir.py
+++ b/tools/fix_gir.py
@@ -14,7 +14,7 @@ def purge_white_space_and_fix_namespace(node, indent=0):
purge_white_space_and_fix_namespace(child, indent+1)
def find_ancestor(node, name):
- if getattr(node, "tagName") == name:
+ if getattr(node, "tagName", None) == name:
return node
parent = getattr(node, "parentNode", None)
if not parent:
@@ -30,8 +30,8 @@ def fix_vfuncs(dom):
name = record.getAttribute("name")
cname = record.getAttribute("c:type")
- assert(name.endswith("Class"))
- assert(cname.endswith("Class"))
+ assert(name.endswith("Class") or name.endswith("Iface"))
+ assert(cname.endswith("Class") or name.endswith("Iface"))
params = (f.getElementsByTagName("parameters") or [None])[0]