From bf54bf828952b5c38f3e230dae9e1f9557c5e469 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Sun, 13 Jul 2008 19:19:29 +0000 Subject: clean_func(): Strip GSEAL out, to avoid us thinking that there are many 2008-07-08 Murray Cumming * codegen/h2def.py: clean_func(): Strip GSEAL out, to avoid us thinking that there are many functions called GSEAL (merge from PyGTK). 2008-01-29 Olivier Crete * codegen/h2def.py (DefsWriter.__init__): Fix copy-paste typos (merge from PyGTK). svn path=/trunk/; revision=794 --- codegen/h2def.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'codegen/h2def.py') 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() -- cgit