summaryrefslogtreecommitdiffstats
path: root/codegen/h2def.py
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/h2def.py')
-rwxr-xr-xcodegen/h2def.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/codegen/h2def.py b/codegen/h2def.py
index 9750598..db62cee 100755
--- a/codegen/h2def.py
+++ b/codegen/h2def.py
@@ -247,6 +247,10 @@ def clean_func(buf):
buf = string.replace(buf, 'G_CONST_RETURN ', 'const-')
buf = string.replace(buf, 'const ', 'const-')
+ #strip GSEAL macros from the middle of function declarations:
+ pat = re.compile(r"""GSEAL""", re.VERBOSE)
+ buf = pat.sub('', buf)
+
return buf
proto_pat=re.compile(r"""
@@ -281,9 +285,9 @@ class DefsWriter:
for func in filter.functions + filter.methods.values():
self._functions[func.c_name] = func
for obj in filter.objects + filter.boxes + filter.interfaces:
- self._objects[obj.c_name] = func
+ self._objects[obj.c_name] = obj
for obj in filter.enums:
- self._enums[obj.c_name] = func
+ self._enums[obj.c_name] = obj
def write_def(self, deffile):
buf = open(deffile).read()